Bahadur Shah II was the last Mughal Emperor. At the time of First War of Independence he was the Emperor of India living in Red Fort. During the 1857 revolt the rebels needed some one who would rule the land once the British were thrown out of the country. So they decided that this leader would have to be a Mughal Emperor.