Bedene, 26, battled past Spain's Carreno Busta, ranked 23 places higher at 43rd in the world, in five sets, winning 7-6 (7-4) 6-3 4-6 5-7 6-2.
It was an impressive show of resolve from the Slovenia-born player, who surrendered a two-set advantage.
However, he recovered his poise, ending the match with 23 aces.
Compatriot Andy Murray reached the third round with victory over Mathias Bourgue on Wednesday.
"The last few months haven't been the best and I have been struggling but I'm really proud of what I have achieved so far," said Bedene. "It meant a lot to win.
"I have only played one fifth set before - in Wimbledon last year, and I won it - and it wasn't easy after being two love up but it shows I am fit enough and I am really proud."
Hindered by a thigh injury, Busta struggled to cover the court in the final stages, but Bedene's performance was full of grit and determination as he showed he could mix it with a European clay-court specialist.
Djokovic is yet to drop a set at the tournament after easing aside Belgium's Steve Darcis 7-5 6-3 6-4 to advance.
Bedene lost his only previous meeting with the Serb, succumbing in straight sets at the 2015 Australian Open.
However, the Welwyn Garden City-based right-hander has risen from world number 116 to 66th in the world since then.
BBC tennis correspondent Russell Fuller
"This was an excellent victory by Bedene because he was up against a fine clay-court player and because he admits his confidence is fragile after winning only two main-draw matches in five tournaments before Roland Garros.
"His 23 aces were the bedrock of victory, along with his ability to draw Busta away from his comfort zone behind the baseline by using the drop shot."
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.
Britain's Aljaz Bedene will play world number one Novak Djokovic after beating Pablo Carreno Busta to reach the French Open third round for the first time.