The 99th-ranked Niculescu swept past the 2017 French Open champion in 51 minutes with Ostapenko winning only four points in the first set.
"I came here early, and actually I didn't spend Christmas at home, I spent it on the plane," Niculescu said.
"But that suits (me) well ... I thought I really played well on Center Court."
Ostapenko had 35 unforced errors and won only two of her 20 second service points.
Niculescu, who converted six of eight break points, next plays Kristyna Pliskova. Shuai Peng of China retired at 3-3 in the third set against Pliskova due to a thigh injury.
Russian qualifier Veronika Kudermetova of Russia beat eighth-seeded Anastasia Pavlyuchenkova 6-2, 1-6, 6-2 in a second-round match.
Kudermetova plays wild card Vera Zvonareva in the quarterfinals after the Russian beat Ivana Jorovic of Serbia 7-5, 4-6, 6-4.
In another second-round match, Alison Riske of the United States beat Evgeniya Rodina of Russia 4-6, 6-2, 6-3.
Sorana Cirstea of Romania had an easy 6-2, 6-2 victory against Pauline Parmentier of France to book her quarterfinal against Riske.
More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports