Mandeep scored field goals in the 18th, 41st and 53rd minute and Rupinderpal Singh was twice on target from penalty-corners as the home side registered a memorable victory.
The last time India had beaten Germany was way back in 2004 in the Champions Trophy in Lahore.
The teams had drawn 3-3 in the pool stages.
India now face Belgium in Saturday’s fifth-sixth places play-off, while Germany take on Argentina to avoid the wooden-spoon in the eight-nation tournament.
In a thrilling contest, the world No 1 Germans held early ascendancy and went 2-0 up through goals skipper Oliver Korn (4th minute) and Thilo Stralkowski (6th).
Mandeep pulled a goal back in the 18th minute, but Benjamin Wess struck in the 27th to enable the Germans go into the breather 3-1 ahead.
After the change of ends, Germany found the back of the Indian net just once when Martin Haner converted a penalty-corner in the 55th minute after Rupinderpal reduced the margin three minutes into the second session from India’s first penalty-corner.
Mandeep then got his second and third goals in the 41stand 53rd minute.
Just when it seemed the match was heading for the penalty shoot-out, India earned their second penalty-corner 30 seconds from the hooter and Rupinder’s flick found the net to send the goodly crown into rapture.
In the earlier match of the day, Belgium defeated Argentina 3-1 via the penalty shoot-out after both teams were locked at 1-1 after the regulation 70 minutes of play.
Image: The Indian hockey team celebrates scoring a goal
Photograph: Hockey India
Happy birthday, Farah Khan, Farhan Akhtar!
Hockey World League: Aussies crush India to storm into semis
World League: England beat hapless India in campaign opener
New Zealand thrash India 3-1 in World Hockey League
Eventful year for Indian hockey as women outperform men