The 36-year-old Swiss overcame an early setback to beat Robin Haase of the Netherlands 4-6, 6-1, 6-1 and will replace old rival Rafael Nadal at the top of the rankings.
Federer surpasses Andre Agassi, who held the top spot aged 33 years and 131 days in 2003, as the oldest man to claim the world number one spot.
It is Federer's first time back at the summit since October 2012 having first claimed the top position in February 2004.
From racquet-smashing enfant terrible with a bad attitude and ill-advised ponytail to universally respected sporting role model, Roger Federer has come a long, long way.
Fourteen years after first grabbing the number one ranking, the 36-year-old Swiss maestro is back on top of the world and widely-regarded as the greatest player in history.
He has 20 Grand Slam titles – a record eight at Wimbledon, six Australian Opens, five at the US Open and one at Roland Garros.
They form part of his 96-career title resume from a 20-year career which has also earned him more than $115 million (B3.6 billion) on-court alone.
He won his first Slam at Wimbledon in 2003 and his most recent at the Australian Open in January, the second oldest champion at a major in the Open era.
"2003 feels like ages ago, because of the ponytail, the beard, whatever, you name it," said Federer on his way to becoming the oldest man to win Wimbledon in 2017.
Many other things have changed for Federer, who has won three of the last five majors, over the last two decades.
Off the court, he is the father of two sets of twins, Myla Rose and Charlene Riva and Leo and Lenny with wife Mirka, a former player he met at the 2000 Olympics in Sydney.
But his career and life weren't always so settled.
As a talented junior, Federer's on-court tantrums and hair-trigger temper threatened to stunt his progress.
"I had a tough time getting my act together out on court, trying to behave properly. For me that was a big deal," he admitted.
Federer famously beat Pete Sampras at Wimbledon in 2001 but was knocked out in the first round the following year.
It took a personal tragedy for him to press the reset the button.
Just when he turned 21, his coach and close friend from his formative years Peter Carter was killed in a car crash in South Africa.
From that point on, the multi-lingual Federer committed himself to winning in style and with grace rather than allow his inner demons to dictate.
Born on August 8, 1981 in Basel, to Swiss father Robert and South African mother Lynette, Federer started playing tennis at eight.
He won his first ATP title in Milan in 2001 and has racked up trophies every year since, with the exception of 2016 when he shut down his season after a semi-final loss at Wimbledon.
That extended rest, to recover from a knee injury, led to his 2017 renaissance when a refreshed Federer won his 18th major at the Australian Open and ending a drought in the majors stretching almost five years.
It was after the first of his five Australian Opens in 2004 that he claimed the world number one ranking for the first time.
In his career, he has already been at the top of the pile for 302 weeks.
He has also won 27 Masters, a 2008 Olympic doubles gold medal, with close friend Stan Wawrinka, and a Davis Cup victory for Switzerland in 2014.
Had he not competed in the same era as Rafael Nadal (16 Grand Slams) and Novak Djokovic (12), his trophy collection could have been more impressive -- he has lost nine finals at the majors to his two great rivals.
With his 37th birthday coming in August, Federer insists he has not set any date for retiring from the sport.
"It's just discussions I always have with my wife about the family, about my kids, is everybody happy on tour, are we happy to pack up and go on tour for five, six, seven weeks. Are we willing to do that?," he said.
"For the time being, it seems like absolutely no problem, which is wonderful."