"This Wimbledon will be my last and the US Open will be my last tournament," the 36-year-old told a news conference.
The American, who has been struggling with a chronic back injury in recent seasons, won the first of his eight Grand Slam singles titles at Wimbledon in 1992 when he beat Goran Ivanisevic in five sets in the final.
Agassi said he had made his decision to retire several months ago but explained: "I waited until now to say something as it is only right that I say it at the place it all started."
The US Open starts on August 28 in New York.
Agassi plays Serbian Boris Pashanski in the Wimbledon first round in what will be his final match at the grasscourt grand slam if he loses.
One of tennis most flamboyant personalities, Agassi won the Australian Open four times, the US Open twice and Wimbledon and the French Open once each.
His triumph at Roland Garros in 1999 made him only the fifth man in history to win a career Grand Slam of all four major tennis tournaments.
More from rediff