Rudyard Kipling had a deep passion for India and its heritage and culture, but also held the superiority complex beliefs of Western men of his time. In his view, while Imperialist actions had many negative consequences, in the long run it was in India's best interests for England and the West to educate and influence the "inferior" native peoples.
In "The Man Who Would Be King," Kipling shows the arrogance of Western man and the necessary consequences of ambition. The two men, Carnehan and Dravot, who attempt to set themselves up as kings, find that their ambitions are only good as far as their subterfuge holds up; when they are exposed as men instead of gods, the native people turn on them. Kipling's view here is that the direct invasion of a native culture with only the purpose of ruling is not a good thing; Carnehan and Dravot were not trying to better their subjects or educate them, but to exploit them as servants and slaves. Had their intentions been more altruistic, they would not have lied and set themselves as gods, but as leaders who wished to better the people. Instead, by using their technological knowledge to attempt subjugation, they set themselves up for downfall when their lie was exposed. In the same way, the real-life British Imperialist tendencies almost always fell apart as the surface altruism fell away under the typical need to subjugate and exploit native peoples.