Bayern were beaten 4-1 by Stuttgart in their Bundesliga season finale and the hangover appeared to linger for Jupp Heynckes' team as Frankfurt took the early lead through Ante Rebic in the 11th minute.
Kevin-Prince Boateng was in action for Eintracht Frankfurt as they pulled off a shock 3-1 upset over Bayern Munich in the final to win their first DFB Pokal since 1998.
Bayern were beaten 4-1 by Stuttgart in their Bundesliga season finale and the hangover appeared to linger for Jupp Heynckes' team as Frankfurt took the early lead through Ante Rebic in the 11th minute.
The German champions looked dangerous throughout the opening half-hour, but couldn't find the end product with Joshua Kimmich flashing a header wide of goal before Robert Lewandowski missed from close range from a Franck Ribery through ball.
Bayern, trailing at half-time for the third match in a row in all competitions, were soon level when Lewandowski's shot from a Kimmich cut-back took a slight deflection and wrong-footed Lukas Hradecky in the Frankfurt goal.
With Bayern pushing for the winner, Frankfurt struck on the counter with Rebic popping up on the end of a long pass over the Bayern defence, settling it with his head and volleying past Sven Ulreich.
The goal was reviewed for handball in the buildup, but after consulting with the video assistant the referee awarded the goal to preserve Frankfurt's shock 2-1 lead.
And Frankfurt got their third with an empty net goal from Mijat Gacinovic after Bayern had pulled Ulreich up for a later corner kick to give the Bavarians incoming coach for next season Niko Kovac a historic piece of silverware.
The result sees the departing Heynckes go out on a losing note, with Frankfurt securing their first German Cup trophy in 30 years after losing in the final in 2006 and 2017.
The win also qualifies Eintracht Frankfurt for next season's Europa League.