Ibrahim Khan was won over by the Peshwa of the Maratha Empire in 1760, and he soon joined the services of the Peshwa to command a battalion having strength of 10,000 men consisting of cavalry, infantry, artillery, archers (including bowmen and pikemen), and bayonet wielding musketeers, compared to the total strength of Nizam's entire army which was no more than 2,000 men.
This was a windfall for Ibrahim Khan and he was the first person to reach the highest level of becoming deputy commander-in-chief as well as in charge of the artillery in one of the powerful Maratha armies.
Sadashivrao Bhau along with Ibrahim Khan had planned and were executing a foolproof battle strategy to pulverise the enemy formations with cannon fire and not to employ his cavalry until the Afghans were thoroughly softened up.
Even when the news of the death of Vishwasrao, the Peshwa's son, reached Ibrahim Khan battalion it kept defending its position against a numerically stronger Afghan army as, one by one, musketeers fell and the remaining members escaped from the battlefield using the darkness as cover on the night of 14 January 1761.
[5] Due to Ibrahim Khan's extreme sense of loyalty to his master Sadashivrao Bhau, he fought to the end till he was captured after all his famed Maratha musketeers laid down their lives, one by one, or simply vanished during the night of 14 January 1761 when darkness fell on the battlefield.
Some of Ibrahim Khan's artillery detachment with infantry and musketeers kept on fighting while defending their positions until sunset to escape in the darkness of night.
Ibrahim Khan was caught by Afghans from Shuja-ud-Daula's captivity and brought before Ahmad Shah Durrani in a severely injured condition.
Ibrahim Khan answered that no man could command his destiny; that his master was killed, and himself wounded and prisoner; but that, if he survived, and his Majesty would employ him in his service, he was ready to show the same zeal.
Ibrahim Khan's courage under attack from Afghan, Oudh and Rohilla forces distinguishes him from others and makes him a memorable hero in folklore and songs in the Deccan region.