The 37-year-old, chasing a record-equaling 24th grand slam title, came through an intense match to win 6-4 4-6 6-3.
Williams won the last of her seven Wimbledon titles in 2016, but after giving birth two years ago and overcoming a knee injury this season, she looks in ominous form once again.
She will play the winner of Tuesday’s later match between Barbora Strycova of the Czech Republic and Briton Johanna Konta.
Former world No.1 Simona Halep fought back from 4-1 down in the first set against against China’s Zhang Shuai before triumphing 7-6 6-1.
In the other quarter final, Ukraine’s Elina Svitolina, the eighth seed, takes on Czech Karolina Muchova.
“I wouldn’t have won that match a couple of weeks ago, she was playing so great,” Williams told BBC Sport.
“It’s a long arduous road, it’s not easy. I’m so pumped.”
Williams had lost just two Wimbledon quarter finals — in 2001 and 2007 — in her 13 appearances in the last eight, but the 29-year-old Riske was determined not to gift her anything.
The world No.55 grabbed the first break of serve for 3-1 but then lost her own serve as Williams leveled 3-3 courtesy of some luck with a net cord which left the scrambling Riske out of position and the court wide open.
But Riske’s forehand was firing, and she broke Williams immediately, only for her compatriot to break again for 4-4.
By now Williams had shaken off the early rust and held her own serve before closing out the set with a fist in the air, watched on by golf great Jack Nicklaus among other celebrities and sports stars in the royal box.
The second set went with serve until 4-4 when Riske grabbed a decisive break to get to 5-4 and served out for the set, crying out “Yesss!”
Williams, who received more strapping to her right ankle towards the end of the second set, sensed she was in a serious battle but got her nose in front early in the third set before the increasingly accomplished Riske broke straight back for 3-2.
Williams had several break points in a roller-coaster eighth game and eventually clinched the break when Riske double faulted.
The veteran served out the match with an ace down the middle and thrust her arms in the air before congratulating a worthy opponent at the net to huge cheers from the capacity crowd.
Williams will also team up with two-time Wimbledon men’s singles champion Andy Murray back out on Centre Court for their mixed doubles second-round match against Fabrice Martin and Raquel Atawo.