The Russian was one of the favourites to win Wimbledon having completed her set of Grand Slam titles at the French Open to retake the world number one spot.
But Lisicki proved too strong and Sharapova came into this tournament ranked only third.
The match looked set to go the same way when Lisicki edged a nip-and-tuck tie-break and then went a break up in the second set, but Sharapova showed her trademark battling qualities to turn things around and come through 6-7 (8/10) 6-4 6-3 after two hours and 47 minutes.
The Russian said: 'I was really happy I was able to beat her today. Obviously losing to her a few weeks ago, I was not really happy with the way that I played, so I wanted to change that result.
'Even though I didn't play my best tennis, I was really happy that I got through it and I stepped up when I had to.'
In the last eight, Sharapova will play Kim Clijsters, who kept alive her hopes of a medal at her first and last Olympics by defeating 11th seed Ana Ivanovic of Serbia 6-3 6-4.
It was the end of the Singles road, though, for Venus Williams, who was edged out in two tie-breaks by German seventh seed and Wimbledon semi-finalist Angelique Kerber, going down 7-6 (7/5) 7-6 (7/5).
The 32-year-old still has the chance of a record fourth Olympic gold medal in the women's Doubles with sister Serena, who needed only 51 minutes to brush aside Beijing bronze medallist Vera Zvonareva 6-1 6-0.
In the last eight, Williams will play eighth seed Caroline Wozniacki, who was cheered on by the Danish Handball team in a 6-4 6-2 victory over Daniela Hantuchova.
World number one Victoria Azarenka will take on Kerber after fighting off a determined challenge from Russia's Nadia Petrova, the Belarusian coming through 7-6 (8/6) 6-4.
The other quarter-final will see sixth seed and former Wimbledon champion Petra Kvitova face Russia's Maria Kirilenko.
Kvitova was particularly impressive, defeating Flavia Pennetta of Italy 6-3 6-0, while 14th seed Kirilenko defeated Germany's Julia Goerges 7-6 (7/5) 6-3.