He retired prematurely in 2004, after being overtaken by a back injury. He played his last ATP level tournament while only 27 years old at the 2003 French Open.
Ríos's achievements this year included stellar performances in the Masters Series (then called Super 9) tournaments. He reached the quarterfinals in Stuttgart and the Masters Series of Rome, and the semifinals in Indian Wells, Monte Carlo, and Canada. In Sankt Polten, Austria, he won his fourth career title by defeating the Spaniard Félix Mantilla 6-1, 6-4. Ríos again reached the final in Santiago de Chile (where a sort of curse seemed to deny him victory in front of his home crowd), and also reached the finals in Barcelona and Scottsdale. For much of the year Ríos would be ranked in the top ten, becoming the first Chilean in history to do so. He finished the year ranked number 11.
The year 1998 brought the peak of the career of Ríos, who reached the number 1 spot in the world. The year began with success. He won the tournament (the first of the year) in Auckland, New Zealand, against Richard Fromberg, then reached the final of the Australian Open, losing to Petr Korda (who would be sanctioned by the ATP in December 1998 after testing positive for nandrolone following a doping test at Wimbledon). The following months brought successes such as the title of the Super 9 (the current Masters Series) at Indian Wells, where he defeated hard-serving Greg Rusedski in the final.The consummation came in the final Super 9 at Key Biscayne, Florida, under the guidance of his coach Larry Stefanki. After victories over Hendrik Dreekman, Tommy Haas, and Goran Ivanišević, Ríos beat Thomas Enqvist in the quarterfinals and Tim Henman in the semis. In the final on March 29, Ríos defeated Andre Agassi 7-5, 6-3, 6-4. In Chile, thousands of people took to the streets to celebrate the triumph of the first Chilean to reach the sport's number one ranking, grabbing the position from Pete Sampras (who had maintained 102 consecutive weeks at number one, and 5 years ending the season as the leader). In the days ahead, there was a crowded reception leading Ríos to former president Eduardo Frei on the balcony of La Moneda, with ten thousand people cheering outside the palace. Ríos's number one ranking lasted four weeks; he lost it after being unable to defend the title at Monte Carlo because of an injury suffered in the Davis Cup while defeating Hernán Gumy in Buenos Aires, Argentina. On August 10, however, Ríos recovered the number one spot for another two weeks. During this extraordinary season Marcelo also won the Rome Masters against Albert Costa in the final, Saint Poelten beating Vincent Spadea, the Grand Slam Cup against Andre Agassi, and Singapore against Mark Woodforde. Furthermore, he reached the quarterfinals in the Madrid and Paris Masters. The year 1998 was a milestone in the career of Marcelo and the sports history of Chile. Ríos won 7 titles, including 3 Masters Series, and reached the final of the Australian Open. On July 27 of that year, he reached the maximum number of points achieved throughout his career: 3719 (by the scoring system used prior to the year 2000). He ended the year ranked No. 2 behind Pete Sampras, who topped the world rankings for a sixth consecutive year.
Ríos maintained a high level throughout 1999, although his game was interrupted by repeated injuries and surgeries. This prevented him from defending the points achieved by reaching the final of the Australian Open the previous year, so he fell several positions in the rankings. He reached the final of the Monte Carlo Masters, but after trailing 4-6, 1-2, had to retire due to a new injury, awarding the tournament to Gustavo Kuerten. Ríos subsequently won the Hamburg Masters in a match that lasted more than four hours against Mariano Zabaleta; 2 weeks later he became champion in Sankt Pölten for the third consecutive time. In October, he won at Singapore and reached the final in Beijing, losing to the Swede Magnus Norman. He also reached the quarterfinals at Roland Garros and the Madrid Masters. Despite the many injuries and surgeries he suffered, Ríos would complete his third consecutive year as a Top Ten player, at the No. 9 world ranking.