The Russian saw off the charge of compatriot Alexandra Panova 6-1, 4-6, 7-5 on the Rod Laver Arena, but the result could have been very different after Panova served for the match at 5-4 in the third and squandered two match points.
Panova's first round victory was her first in a Grand Slam, but despite struggling early on she grew into the game and at times she gave Sharapova a lesson in serving.
A run of nine points in a row from the fourth game helped Sharapova on her way to a 4-1 lead in the first set, and she duly finished off the opener without too much trouble.
Sharapova had served relatively well in the first set, but her first serve percentage dropped to just 50 percent in the second as Panova converted two break point opportunities on her way to taking the second set 6-4.
In the decider Panova jumped to an early lead with two breaks of serve, and she looked set for a shock victory. However, Sharapova is a fighter and fight back she did.
The world number two pulled on break back, but at 4-5 she face two match points. It was her that Panova eventually wilted, with Sharapova getting the break before holding to love. At 15-40 Sharapova had two match points, but unlike Panova she only needed one to book her place in the third round.