Japan's Osaka, 24, was beaten 4-6 6-3 7-6 (10-5) at Melbourne Park.
Unseeded Anisimova, 20, will play Australian top seed Ashleigh Barty in the last 16.
Barty has still not dropped a set this week after a 6-2 6-3 victory over Italy's Camila Giorgi.
The 25-year-old Queenslander is carrying the hopes of a nation desperate to see a home Australian Open champion for the first time since Chris O'Neil in 1978.
Most expected Barty to face Osaka in the last 16 when the draw pitted two of the game's biggest stars in the same section.
Osaka was seeded 13th after taking a four-month break at the end of last season, during which she revealed she had been suffering from depression.
The two-time champion, who also won the 2019 title at Melbourne Park, had also breezed through her opening two matches but faced a different proposition in Anisimova.
The American announced her arrival as a potential star when she reached the 2019 French Open semi-finals aged 17.
But the death of her father and coach Konstantin shortly before the US Open later that year understandably had a debilitating effect on her career.
Against Osaka, the world number 60 showed on the biggest stage that she has rediscovered her best form and was able to effectively use her power.