Top seed Williams - who has won the WTA Premier clay-court event for the last two years - looked in ominous form in the Spanish capital, and sealed her third-round spot in just over an hour.
Peng struggled to live with the world number one right from the off, as she was broken in her very first service game and quickly fell 3-0 down.
Williams duly cruised through her next two service games before taking the opening set by breaking her Chinese opponent again in the eighth game.
The second set went with serve until the fourth game, when Williams broke Peng again.
World number 42 Peng held her next two service games, but was unable to force a break as Williams comfortably progressed to a last-16 tie against 14th seed Carla Suarez Navarro.
Suarez Navarro, who won her maiden WTA Tour title at last week's Portugal Open, had few problems in defeating Alison Riske 6-2 6-4.
Third seed Agnieszka Radwanska, meanwhile, battled past Svetlana Kuznetsova in three sets.
Radwanska got off to a flying start in the opener, racing into a 4-0 lead before eventually seeing it out 6-3, but dropped serve on four occasions in the second set to allow Kuznetsova to draw level by taking it 6-4.
The world number three was also pushed all the way in the decider, but eventually won through 7-6 (8-6) to book her place in the third round.
The Pole will now face Italy's Roberta Vinci, who beat the 13th-seeded Caroline Wozniacki 6-3 6-3.
Earlier on Wednesday, Simona Halep, seeded fourth, defeated Lara Arruabarrena 6-4 6-4.
Halep went 3-0 up by sealing two early breaks, only for her Spanish opponent to hit back with two breaks of her own to draw level at 3-3.
However, the Romanian then claimed the only subsequent break in the opening set in the ninth game to take the opener 6-4.
Halep then broke again in the very first game of the second set, and that proved sufficient as both players held their serve throughout the remainder of the set.
The world number five will now face a last-16 match against Sabine Lisicki, who beat Irina-Camelia Begu 6-3 6-4.
Sixth seed Jelena Jankovic, meanwhile, was upstaged 2-6 7-5 6-7 (3-7) by Anastasia Pavlyuchenkova, who will now play Ana Ivanovic in round three.
Elsewhere, qualifier Caroline Garcia benefitted from a walkover as Maria Kirilenko dropped out of the tournament before their encounter.
The French world number 51, who was leading Angelique Kerber 6-3 2-0 when the seventh seed retired in their first-round match, will now face 10th seed Sara Errani in the last 16.