A huge media presence met the player outside the court, after a judge refused his request to appear by video or to enter the building by car to avoid the spotlight.
The deal, agreed in advance, includes a 23-month jail sentence.
But in Spain, convicts do not usually do time for sentences under two years.
The non-violent nature of Ronaldo's offence means he is unlikely to spend any time at all in jail, serving it on probation instead.
The court appearance lasted mere minutes as Ronaldo accepted the deal offered by prosecutors.
The current Juventus player, who played for the club in Italy the night before, arrived at the provincial court with his fiancee Georgina Rodriguez. Smiling and giving a thumbs-up, he was apparently unfazed by the media presence.
His lawyers had argued that given his fame, avoiding the main entrance was needed for the player's security.
What are the allegations against Ronaldo ?
Ronaldo, five-time winner of Europe's Ballon d'Or and often titled one of the world's best players, was accused of avoiding paying tax in Spain between 2010 and 2014, when he was playing for Real Madrid and based in the Spanish capital.
Forbes lists the 33-year-old as the third-wealthiest athlete in the world, with estimated earnings of $108m (€95m) a year.
The case centres around lucrative image rights deals. Prosecutors say the proceeds were funnelled through low-tax companies in foreign nations to avoid paying the required tax.
In court, as part of his deal, Ronaldo acknowledged four incidents amounting to €5.7m owed, according to Spanish-language news agency EFE.
In 2017, when the allegations first emerged, prosecutors said it was a "voluntary and conscious breach of his fiscal obligations in Spain".
But Ronaldo's lawyers said it is all down to a misunderstanding over what was and was not required under Spanish law, and deny any deliberate attempt to evade tax.
The deal, struck in June last year, had to be agreed with Spain's tax authorities.
Xabi Alonso also facing trial
Ronaldo is not the only high-profile player to face the wrath of Spain's tax system.
His former Real Madrid team-mate Xabi Alonso also appeared in court on Tuesday in connection with similar offences amounting to about €2m.
Alonso was appearing before the court for the first time, facing a potential sentence of up to five years. Unlike Ronaldo, he has not yet struck any deal with authorities and has maintained his innocence.
Shortly after Alonso's trial began, the court suspended proceedings to consider whether it was competent to hear the case, or if it should be referred to another criminal court, EFE reports.
The longer sentence prosecutors are seeking means that Alonso could, unlike Ronaldo, face jail time.
There are several other examples of footballers facing Spain's courts in recent years:
- Barcelona star Lionel Messi avoided a jail sentence for a similar schemeinvolving image rights, paying several million in a "corrective payment" in back taxes and fines
- Neymar da Silva Santos Júnior was at the centre of a row when Barcelona was fined millions after being charged with tax fraud over Neymar's signing - but avoided admitting the offence
- Real Madrid's Marcelo Vieira admitted to tax fraud and accepted a four-month suspended jail sentence over his use of foreign firms to handle almost half a million euros in earnings
The recent crackdown on high-profile footballers follows the removal of a tax exemption in 2010. Known as the "Beckham law", it had allowed footballers to curb their taxes.
Ronaldo also faces another ongoing legal battle: the football superstar is accused of rape in Las Vegas in 2009, a charge which he denies.
More about: Ronaldo