Neven Subotic put Dortmund ahead from a corner but Kevin Volland equalised in similar fashion and Subotic was at fault as Roberto Firmino classily gave Hoffenheim a half-time lead.
Dortmund started the second half well and drew level when Pierre-Emerick Aubameyang headed in Eric Durm’s cross and with no more scoring, the game went to extra time where Kehl’s superb volley secured a 3-2 win for Jurgen Klopp’s side.
Ricardo Rodriguez’s penalty earned Wolfsburg a 1-0 win over Freiburg as they joined Dortmund in the last four.
Wolfsburg keeper Diego Benaglio made a brilliant save from Jonathan Schmid’s free-kick but opposite number Roman Burki denied Bas Dost, twice, and Vieirinha before half-time.
Andre Schurrle and Kevin de Bruyne missed good chances early in the second half but Rodriguez converted after Julian Schuster brought down Daniel Caligiuri in the box.
Benaglio saved from Maximilian Philipp and Rodriguez cleared Mike Frantz’s effort off the line to secure the Wolves’ progress.