The emergence of nationalism in India stemmed from multiple factors such as the introduction of Western education that promoted ideas of liberty and equality, the role of influential leaders, and reactions against racial discrimination. These elements collectively ignited a sense of Indian identity and unity against British colonial rule.