The siege of Bayana (late 1526-February 1527) was one of a series of incidents that discouraged Babur's army in the build-up to the decisive battle against Rana Sangha of Mewar at Khanua in March 1527, but that ended without the fort falling.
In the aftermath of Babur's victory at Panipat Bayana (50 miles to the west of Agra) had held out against Babur. The governor, Nizam Khan, had even inflicted a defeat on a small army sent to attack the fort (battle of Bayana, c.September-November 1526), but when he discovered that the massive army of Rana Sangha was approaching from the west Nizam Khan surrendered the fort to Babur in return for some lands in the Doab. Bayana was first given to Dost, Lord of the Gate, and then to Mahdi Khwaja.
Soon after arriving at Bayana, Mahdi Khwaja found himself under attack. It isn't clear how closely Bayana was blockaded by Rana Sangha - Babur's memoirs suggest that the blockade was a little intermittent. Mahdi Khwaja was able to get a series of messages to Babur at Agra early in the siege, altering him to the threat and giving him time to gather his scattered forces together.
Babur responded by sending a force of light troops under Qismati towards Bayana. They defeated some of the Rana's scouts, and confirmed that Hasan Khan Miwati, one of Ibrahim Lodi's former retainers, had joined the enemy army. More news arrived between 11-14 February, while Babur was camped outside Agra. Babur's men had been unable to get into Bayana, and the garrison had been defeated after making a sortie, suggesting that at this stage the siege was being pursued quite vigorously (although it is also possible that both setbacks actually happened some way outside the town).
The siege was probably lifted soon after Babur left his camp outside Agra. On 14 February he sent another message to Bayana, ordering Mahdi Khwaja to pull the garrison out of the town and bring in to join the main army. On the following day Mahdi Khwaja and Babur's light troops reached the main camp, suggesting that the siege had been lifted. Tod's Annals of Mewar also records that the Rana lifted the siege as Babur advanced towards him, and prepared for the decisive battle at Khanua.