The Brazilian, who was banned for two years for EPO use in 2009, was a cut above some high-quality rivals on the queen stage.
Mauro Santambrogio (Vini Fantini-Selle Italia) and Michal Kwiatkowski (Omega Pharma-Quick Step) followed Diniz across the line on the 173.1km route from La Punta to Mirador del Potrero.
Temperatures at the start of the stage were as high as 35C, but the route soon took the riders uphill, peaking with the 2000m Category One climb at the Alto de Negoli.
The early group of seven escapees included Sylvain Chavanel, but while they spent most of the day in front they were reeled in with 35km to go.
On the 8km climb to the line Diniz went solo and broke free of the pack to win for his Funvic Brasilinvest team. He also assumes the lead of the general classication.
Peter Sagan, meanwhile, suffered a crash and retired from the race.
The seven-stage event continues tomorrow with a time trial, where Alberto Contador will be amongst the favourites.