French winger Diaby's early opener was cancelled out by a 67th-minute equaliser from Julian Brandt against his former club.
Dortmund was left to regret a host of missed chances when Diaby then set up a superb goal by Leverkusen's 17-year-old midfielder Florian Wirtz for the winner 10 minutes from time.
"The second half was an open exchange of blows but we did well in the end," said Leverkusen coach Peter Bosz.
The victory was Leverkusen's first in five league games and puts them second on goal difference, level on 32 points with RB Leipzig, who host Union Berlin on Wednesday.
Leverkusen are four points behind leaders Bayern Munich, who are away to Augsburg on Wednesday in the Bavarian derby.
The away defeat was a fresh blow to Dortmund's title hopes, leaving them seven points adrift of Bayern.
"We are not able to keep up the level needed for 90 minutes," complained Brandt.
"A lot can happen in 17 games, but we are far away" from leaders Bayern in the table.
As Dortmund captain Marco Reus put it bluntly, the title race "did not play a relevant role neither before nor after the game" for his team.
Leverkusen took the lead in the 14th minute when they returned a clearance kick by Dortmund goalkeeper Roman Buerki, which was snapped up by Leon Bailey on the halfway line.
The Jamaica winger put in a terrific diagonal pass to Diaby who sprinted away from the Dortmund defence and fired past Buerki on 14 minutes.
Dortmund equalised midway through the second half when Brandt hit the far bottom corner from 25 yards out. He then squandered another chance moments later.
England winger Jadon Sancho also fired wide as both sides had a string of chances.
Diaby then did brilliantly to put Wirtz in enough space to steer the winner past Buerki.
Wolfsburg is fifth, level with Dortmund on 29 points, after a 2-0 win at Mainz thanks to goals by Polish midfielder Bartosz Bialek and Dutch striker Wout Weghorst.