Both sides came into the game with question marks over them after unconvincing group stage performances with England scoring just twice despite topping the group while Germany needed a late goal against Hungary to seal their progress.
It was a game of few chances, though Jordan Pickford made an impressive save to deny Kai Havertz just after the interval, while Germany defender Mats Hummels produced an impressive goal line tackle to deny Kane just before half-time.
After a quiet first half, Luke Shaw grew into the game and provided an assist for both of the England's opener, while Jack Grealish once again started on the bench, but was introduced on 69 minutes in place in place of Bukayo Saka and also set up a goal.
The breakthrough came on 75 minutes as Shaw played a ball across goal for Sterling to tap home from close range following good work from Grealish.
Thomas Muller then had a glorious chance to equalise for Germany after Sterling had given the ball away, but somehow put his effort wide when he was clean through.
Shaw and Grealish combined again for the second goal with Aston Villa man providing the assist on this occasion.
Kane, who appeared to pick up an injury midway through the second half but carried on playing, sealed the victory with his first goal of the tournament on 86 minutes as he finished off a Grealish cross with a header from close range.
"We knew we needed a big performance against a difficult side, and we did that today," Sterling said after the match. "Doing it for your country is always special.
"For half a second I thought let it [Sterling's goal] not be offside, but I'm so happy it went in. We knew the intensity we could play at, not a lot of teams can deal with it.
"We kept going, [Declan] Rice and [Kalvin] Phillips, ate up ground and were animals in there. All-round, great team performance. We take it game by game, we go away, recover and get focused onto the next one."
A clean sheet ensure England are the only remaining side in the Euros yet to have conceded a goal.