The British heavyweight, 33, controlled the contest against the durable American but it was not the explosive early finish many expected.
Two judges scored it 117-111 and one 118-111 to Joshua.
Tempers flared after the final bell as the two fighters squared up to each other, prompting their teams to enter the ring and be separated by security.
It is Joshua’s first win in more than two years, having lost consecutive bouts to WBA (Super), IBF and WBO world champion Oleksandr Usyk.
“No knockout, so no good. It is a brutal sport, but knockouts are everything. I’m not too happy,” Joshua told 5 Live Boxing.
“I could have thrown more shots, and I should have, no excuses. But I will. That is part of coming back; you have to be your own biggest critic.”
He also called out fellow Briton and WBC champion Tyson Fury, saying: “I try and provide for the fans. I know who they want. They said Tyson Fury - the ball is in his court.”
Joshua has now won 25 fights, with 22 stoppages, and lost three since turning professional in 2013.
It is a second defeat for Franklin, 29, having lost to Briton Dillian Whyte in November.
Joshua returned to the O2 Arena - once a fortress for the Watford fighter - after seven years. His seven previous fights at the venue ended inside the distance, but this was not vintage Joshua.
A boisterous sellout crowd, including popstar Liam Payne and journalist Louis Theroux, were in attendance, eager to see whether Joshua - still one of the biggest names in British boxing - remained a force in the division.
Away fighter Franklin - who earlier travelled on the London underground to the arena due to traffic - entered the ring first to huge jeers. Joshua followed, marching to the ring with a look of determination.