This is a fairly good explanation of how there were actually two Captain Nemos. When Verne wrote 20,000 Leagues under the Sea, he modeled Nemo as a Polish aristocrat fighting the Russian empire. By the time he wrote The Mysterious Island, Verne's political focus had shifted and he recast Nemo as an Indian prince fighting the British empire. Few people realize this distinction, so portrayals of Nemo in popular culture tend to be an amalgam of these two characters.
And the reason for the shift was both political and economic: Verne's publisher was afraid of both losing the Russian market and souring relations between France and Russia, though public sentiment in France leaned in favor of the Poles. In other words, the shift was not Verne's intention.