The 40-year-old, who has previously played for Juventus and Barcelona among other European clubs, was handed his marching orders in the 87th minute for elbowing Wrexham defender Stephen Wright in the face.
His actions sparked a 20-man brawl, before former Liverpool defender Wright was also dismissed for his part in the altercation.
20 man brawl has just ensued on the pitch. Stephen Wright and Edgar Davids sent off pic.twitter.com/0DHADAUhgx— Wrexham.com (@wrexham) October 13, 2013
The match ended 1-1, with Wrexham also having another player, Johnny Hunt, dismissed in stoppage time.