India achieved independence from British rule on August 15, 1947.
The person serving as the Viceroy of British India during this pivotal time was Lord Mountbatten.
He was the final Viceroy and was instrumental in overseeing the transition of power and the subsequent partition of India.
Therefore, Lord Mountbatten held the position of Viceroy when India gained independence in 1947.