The Romanian, ranked number 92 in the world, 51 places behind the Russian, won 4-6, 6-4, 6-3.
In a match lasting more than two and a half hours, Sharapova hit 52 unforced errors as opposed to just 17 from Niculescu.
And she could also convert only six of 15 break points.
The former world number one, twice a winner in Doha, had been given a wildcard into the draw and was one the tournament’s major attractions.
“I did a good job of winning the longer rallies, even though that’s not really what I wanted to get myself into,” said Sharapova afterwards.
“So, physically I felt good. I just got pretty passive in the end and starting making too many errors.”
It was the 30-year-old’s first appearance in Doha since 2013 and her first match since losing to Angelique Kerber in the third round of the Australian Open last month.