Icardi gave Galatasaray the lead in the seventh minute, but Ankaragucu attacker Milson tied the score nine minutes later. Five minutes before halftime, Icardi gave Galatasaray the lead once more.
Yilmaz of Galatasaray scored in the 73rd, and Sergio Oliveira put the game away in the 78th.
With Tuesday's 2-0 home victory against Antalyaspor, Galatasaray now has 82 points, five more than their second-place opponents Fenerbahce.
Galatasaray supporters drove through Istanbul's streets carrying red and yellow flags while honking their horns in support of the team.
On Sunday, Galatasaray and Fenerbahce will meet each other in the season's last game.
"It's quite an emotional moment for me, unbelievably great happiness. I would like to thank the great Galatasaray fans, and my players. Hopefully, we will complete the league by winning the derby match next week,"
Okan Buruk, the coach of Galatasaray, spoke with BeIN Sports.
Due to Galatasaray's continuously strong play throughout the season, the competition for the championship has heated up recently.
The club wowed spectators with their offensive skill and defensive tenacity under the leadership of Argentine forward Icardi and Belgian Dries Mertens.
The other of the three major Istanbul clubs, Besiktas, is in third place with 74 points following Tuesday's games, while defending champions Trabzonspor is in fifth.
Due to the destruction wrought by the earthquakes that occurred in southern Turkey in February and resulted in the deaths of more than 50 000 people, two Superlig clubs, Hatayspor and Gaziantep, withdrew from the championship this year.