The world number one was edged out in a tight first set but lost three games thereafter as she stormed to a 4-6 6-3 6-0 victory and her 11th straight win over Sharapova.
The American has passed Steffi Graf's number of titles in this competition, while Sharapova has now been defeated in every one of her five final appearances in Miami.
"It's obviously been a really nice month," Sharapova said at the trophy ceremony. "It's disappointing to end it like this but Serena played a great match and I'm sure we'll play a few more times this year."
It was the Russian who came out with a point to prove, pushing hard on the serve of Williams, who had to fend off three break points in the third game.
The pair traded breaks before Sharapova broke again to take a 5-4 lead and then held to seal her first set against Williams in 14 attempts.
It seemed likely the French Open champion was going to end her jinx in this competition - where she has finished runner-up for the last three years - when she broke her opponent to take a 3-2 lead in the second set.
That proved the turning point for Williams, who did not lose a game thereafter, as she broke to love to level at 3-3 before a double fault from Sharapova handed the initiative to the 15-time major winner.
Williams duly served to take the match to the decider and the 31-year-old did not look back as she cruised to victory in a little over two hours.
"Maria definitely pushed me - she did a really great job today [Saturday]," Williams said.
"I look forward to our next matches - it's going to be really fun for the fans and for us and for everyone."