Motivation is an important and difficult word here that requires discussion.
This is because there is a small but persistent historiography that argues that the net outcomes of European imperialism (or sometimes just the imperialism of one European state) were on balance positive even if there were negatives. L.H. Gann and Peter Duignan's book Burden of Empire is a classic example of this argument; more recently the conservative historian Niall Ferguson has been making this argument.
When you ask about motivation, a number of difficult methodological problems inevitably follow. First, the motivations of some historical actors can only be inferred, with little direct evidence. Second, human beings fairly commonly make statements about their motivations that are either conscious lies or forms of unconscious self-deception. Third, sometimes the real motivations of a past human being were not in fact known to them, e.g., we can be motivated to act by ideas, institutions, forces, incentives, etc., that we have no direct awareness of, and in many cases could never actually be directly aware of. Fourth, when we're talking about imperialism and many other similar large-scale, complex phenomena, it's not at all clear that the known and implicit motivations of individuals scale up to the motivations of governments, civic institutions, corporations, 'cultures'--those may have motivations of their own that are not simply the sum of all the individuals involved. And fifth, an individual may have motivations for participating in a process that have no influence on that process--motivations are not always matched to actual power to cause something to happen.
With all of that in mind, I'll venture the following generalization about late 19th Century European imperialism: that there was a small proportion of individuals actively involved in late 19th Century imperialism who genuinely believed that European imperial rule would serve humanitarian ends and would prove wholly beneficial to societies in Africa, the Middle East, South and Southeast Asia, and Oceania, and their participation in imperial administration or aspects of imperial rule were motivated by those beliefs. There was a large proportion of individuals involved whose use of humanitarian rhetoric was at a minimum contradictory and more typically ideological, cynical and manipulative. There were a small proportion of individuals who were unapologetically disdainful of humanitarian motivations in their imperial actions. There were a small proportion of individuals who really didn't even bother to dismiss humanitarian arguments because their activities were so self-evidently about personal self-interest. There were also Europeans present in imperial territories who were motivated by sincere desires to be helpful to colonial subjects and who pointedly did NOT support imperial rule.
An example of the first small group would be David Livingstone, the British missionary. Livingstone is often given credit for coining the "three Cs" as a reason for British imperialism in Africa: Christianity, commerce and civilization. Livingstone is interesting both because I think you can legitimately say that he believed that British imperial rule in sub-Saharan Africa would be of great and direct benefit to African societies. He thought that because he believed Christianity would save their souls, civilization would grant them access to the benefits of modernity, and commerce (e.g., market capitalism) would repair the harms done to African societies by the Atlantic slave trade. This last was especially important to Livingstone and it was fairly common to many genuine "humanitarian" imperialists: they thought that imperialism would repair the damage caused by earlier encounters with European societies that led to slavery or other destructive transformations (such as opium in Southeast Asia and China). "Humanitarian" imperialists also often believed that they were defending non-Western women from indigenous practices. Again, keep in mind that even if these were genuine motivations, they were not genuine *outcomes--*even genuinely pious, well-meaning missionaries (including Livingstone) were at best racially paternalistic and frequently turned a blind eye to abuses of power once imperial conquest began.
The second group is huge: people who would provide sanctimonious claims about humanitarian motivation in many contexts but who didn't really mean it--whose actions provide ample evidence that in practice they were motivated more by the pursuit of power over people they saw as near-permanent racial inferiors and were motivated more to expedite the economic exploitation of those people, or were simply motivated by their own professional advancement. Some of my own research has focused on imperial administrators in Southern Rhodesia between 1890 and 1960, and I would say there were one or two of them who genuinely seemed to have the interest of Africans placed under the authority at heart (but who were therefore ignored by their superiors), a number of them who would sometimes seem to care about their subjects' welfare but other times not at all, and plenty who were never in any way actually motivated by a desire to help Africans under their power, but who would of course obediently spit up all the standard humanitarian cliches on command whenever appropriate. That scales all the way up to the top, to major imperial actors like Frederick Lugard or Louis Faidherbe, who understood that publics back in Europe expected that there was some genuine "civilizing" motive behind empires, or at least rhetoric to that effect. Most imperial administrators, even those with some partial inclination to believe they were doing the right thing for their subjects, were derisive towards missionaries and others who criticized the inhumane aspects of imperial rule--British imperial officers often complained of "negrophiles" and "Exeter Hall" (known as the center of the anti-slavery movement) who didn't really understand what the realities of colonialism were.
At the far end of that second group you have people like Leopold II of Belgium, who was a master of claiming to have purely humanitarian motives but whose practice was so thoroughly exploitative and violent that any such rhetoric is clearly a conscious, cynical lie. That shades into a third group of actors who didn't even offer a pro forma kind of humanitarian defense, but who instead argued that European imperialism was about national self-interest (gaining access to natural resources, or blocking another European power from doing so) and that whether it benefited colonial subjects was of no real importance. Mostly this fraction of individuals, if they were in government service, were not invited to share their views with larger publics or to speak on behalf of the government, but this attitude was often openly voiced within government correspondence and within the culture of imperial authority. This was especially true wherever there were large numbers of European settlers, as in Rhodesia, Kenya and Algeria.
The final group of people are those who simply didn't bother to address the imperial project except inasmuch as it was necessary to their own self-interest--miners, merchants, settler farmers, etc: these individuals didn't really much care what the higher justifications for imperialism might be, they just wanted to get on with whatever they were doing to make money with an assurance that colonial subjects would stay subjugated. In some colonies, there were very few such people, in some colonies there were quite a lot of them.
And there were small numbers of Europeans living within imperial territories who were strong critics of imperialism because they were motivated by a desire to see the lot of non-Westerners actually improved and saw imperialism as an impediment to that. Bishop John William Colenso in South Africa is a good early example of this; a later example from the same region would be someone like Guy Clutton-Brock in Rhodesia. Often these individuals were expelled by imperial authorities, however.