Joao Pedro gave Cagliari the lead after 20 minutes, curling the ball into the net from outside of the penalty area.
Lorenzo Crisetig tested Luigi Sepe minutes later, but the Empoli goalkeeper diverted the ball past the post, and Joao Pedro nearly scored his second of the match when a free kick rebounded off the right upright.
Danielle Dessena shot over the bar, and Joao Pedro threatened again before the break as Cagliari pressed for another goal.
Massimo Maccarone had Empoli's only two chances of the half, striking over the bar and rolling the ball past the right post.
Vecino had two more scoring chances before full time and Rugani was also unable to equalise as it appeared that Cagliari would escape with the spoils.
However, with the last play of the match, Vecino finally equalised with a low shot into the centre of the net.
The result means that Cagliari stay three points from safety with 11 matches remaining of the season.