Spain's national court in Madrid, which specialises in financial affairs, said in its decision that the amount of €724,904.86 corresponded to what Heras could have earned during his two-year suspension.
After testing positive for the banned hormone EPO in September 2015 after the Vuelta a Espana, Heras had his victory in the race stripped and was banned for two years by the Spanish cycling federation causing him to retire.
The ban was subsequently overturned in the Spanish courts in 2012 due to irregularities in the screening of his urine test.
Judge Berta Santillan Pedrosa ruled the Spanish state was responsible for the error and liable to compensation to Herras.
Lawyers for the state have until February 8 to lodge an appeal.
The cyclist and his company, Bejar&Barcycling Sport SL, who manage his image rights had lodged their case against the state in January 2015, claiming over a million euros in compensation to offset losses caused by the sanction.
Heras, 42, is the only man to win the Vuelta four times having also won in 2000, 2003 and 2004.
The decision is another legal setback in the fight against doping in Spain, which has often been accused of being a soft touch on drugs in sport.
In 2013 anti-doping authorities were angered when a judge ordered the destruction of over 200 blood bags seized from the premises of doctor Eufemiano Fuentes, who was convicted for endangering public health by providing blood-doping services to cyclists.
Appeals against the destruction of the blood bags, which played in major part in damaging Madrid's bid for the 2020 Olympic games, are still being processed in the Spanish courts.