Edison's Conquest of Mars ( 1898 ) by Garrett P. Serviss was an unauthorized sequel to H.G. Wells' War of the Worlds .
The plot is basically about Earth arming after repelling the Martian invasion, testing their fancy new ray gun (created by the titular Edison) and then embarking on a counter-invasion of Mars.
Set after the devastating Martian attack in the previous story, the novel depicts Edison leading a group of scientists to develop ships and weapons, including a disintegration ray, for the defence of Earth.
Edison and company fight the aliens in space and on Mars, eventually causing a flood that defeats the enemy and forces an end to hostilities.
The book is now out of copyright, so it can be read at Project Gutenberg .
Note that while the Earth forces defeat the Martians, they don't remain as colonists; I have an alternative suggestion from 1900 if that is important.
scifi.stackexchange.com/users/101407/DavidW
Even earlier is the 1930 Last and First Men by Olaf Stapledon, a novel of vast scope which follows the development of humanity and its successors for hundreds of millions of years into the future.
The Fifth Men invade and colonise Venus when Earth becomes uninhabitable.
From the Wikipedia article: After clashing with and finally eliminating the Third and Fourth Men,they develop a technology greater than Earth had ever known before.
When Earth ceases to be habitable, they terraform Venus, committinggenocide on its marine native race which tries to resist them.
scifi.stackexchange.com/users/23/Mike Scott
1887: Man Abroad:
A Yarn of Some Other Century , an anonymous novel.
Humans from earth invade the planet Venus.
The Venusians are human colonists rather than indigenous lifeforms, but the question does not make this distinction.
WorldCat summary: A fantastic classic science fiction tale from an anonymous late-19th century author.
In a far-flung future, humanity has colonised the solar system.
The story is set against a background of interplanetary war, with mighty electric spaceships riding the inter-system electric currents to battle in epic space warfare.
From Everett F. Bleiler 's review in Science-Fiction: The Early Years , which you may be able to read at Google Books : The time is not specified, but is far enough away for man to have colonized the whole solar system.
The other planets and the asteroids are like earth, with similar atmosphere and gravity, and presumably similar vegetation.
[. . . .] As the story opens, the Jupiterns [ sic ], who resent the earth's attempt to annex Luna, declare war.
In a space battle the Jupiterns defeat the terrestrial navy, but this leads to their downfall, for among the prisoners of war are many highly skilled agents provocateurs who set off a general mutiny among their captors in the Jupitern armed forces.
Other earth agents subvert the Jupiter–Venus alliance and sidetrack the Venusians into invading Jupiter to capture women, since women are in short supply on Venus.
Venus then declares itself a republic.
At this point the earth counterattacks by invading Venus, thereby falling into war with Mercury, which resents earth interference on Venus.
But then earth suddenly and inexplicably withdraws its forces when victory seems in sight.
The journalist Weber Lockmore, who is the central character for the later part of the novel, has a roving commission throughout the solar system.
He makes a huge fortune on Mercury and accidentally discovers why earth withdrew its forces: The Senate was bribed.
[.
. . .]
scifi.stackexchange.com/users/14111/user14111
1932: A Conquest of Two Worlds , a novelette by Edmond Hamilton , first published in Wonder Stories , February 1932 , available at the Internet Archive , reprinted in Startling Stories , January 1948 , also available at the Internet Archive .
The two worlds conquered by Earthmen, against bitter resistance by natives who are ruthlessly suppressed, are Mars and Jupiter.
Here is the editorial blurb from the original publication in Hugo Gernsback's Wonder Stories : Just as the white man had nothing to be proud of in his early conquest of the Americas, so the human race will hardly look back with pride if it manages to conquer the solar planets.
The dominating force of greed is not expected to suddenly vanish when enterprising men roam the interplanetary spaces.
It is unfortunate that after brave and unselfish men have opened up new lands, the great profits that they bring go to financiers and business men who risk neither their lives nor their money.
Suppose, as Mr. Hamilton shows so dramatically, the selfish exploitation of other planets was being accomplished for greedy exploiters, and to conquer those worlds meant the decimation of its harmless population, would you aid in that process?
Read this absorbing story, and then write us your opinions of the conduct of Mart Halkett.
We will print the best letters.
Hamilton's protagonist, Mart Halkett, is a Terran commander who defects to the Jovian resistance.
scifi.stackexchange.com/users/14111/user14111
I can certainly push this back to 1962 and H Beam Piper's novel Little Fuzzy (which has many similarities with Avatar ).
Protagonist Jack Holloway lives a solitary life in a wilderness of planet Zarathustra, itself "owned" by the Chartered ZarathustraCompany (under Victor Grego), which installed basic services andcolonial outposts initially, and now reaps the benefits of newdiscoveries, such as the valuable "sunstones" mined by Holloway untilhe befriends a tiny, golden-furred humanoid that he names "LittleFuzzy".
Little Fuzzy brings his family/tribe to meet Holloway and thelot of them promptly adopt Holloway as well.
Upon discovery that theFuzzies' intelligence may qualify them as a sapient species, theCompany moves against them.
The novel is out of copyright, and can be found here .
John Scalzi has taken advantage of this to publish his own rewritten version.
scifi.stackexchange.com/users/23/Mike Scott
"A True Story" is a novel written in the second century AD by Lucian of Samosata.
In it the heroes travel to the Moon and engage in warfare with the King of the Moon. https://en.wikipedia.org/wiki/A_True_Story
scifi.stackexchange.com/users/131468/Joseph Beuys' Mum
I doubt it's the first, but I can push the date back to 1972: Ursula
K Le Guin's "The Word for World is Forest".
Brief summary from Wikipedia
In The Word for World is Forest, the second thought experiment is thecolonization of a pacifist culture on the planet Athshe by amilitary-controlled logging team from Earth, known in the novel as"Terra"; additionally, the inhabitants of Athshe recognize the peoplefrom Terra as human, but the Terrans do not see the Athsheans, who aresmall and covered in green fur, as human.
scifi.stackexchange.com/users/111696/Ethan
We see alien invasion of Earth in fiction all the time, but reverse is a rare sight.  There's only one example of this on top of my head right now:  Avatar  (2009)  I don't believe that  Avatar  was the first to show human invasion of an alien planet. Or, was it?  Which Sci-Fi work first showed human invasion of alien planets?
Which Sci-Fi work first showed human invasion of alien planets?
scifi.stackexchange.com
<history-of>
scifi.stackexchange.com/questions/235387
scifi.stackexchange.com/users/931/Umbrella Corporation
It is not clear exactly which is the earliest novel depicting a human invasion of an alien planet, however, a strong contender would be Edison's Conquest of Mars by Garrett P. Serviss, which was published in 1898. Other more recent novels depicting a similar storyline include Last and First Men (1930), A Yarn of Some Other Century, A Conquest of Two Worlds (1932) and Little Fuzzy (1962). It depends on your defintiion of sci-fi work but the earliest work of fiction to use this trope is perhaps "A True Story", written in the second century AD by Lucian of Samosata. Other contenders include Edison's Conquest of Mars ( 1898 ) by Garrett P. Serviss and the late 19th century A Yarn of Some Other Century, an anonymous novel.
Possibly Edison's Conquest of Mars ( 1898 ) by Garrett P. Serviss, in which Earth arms after repelling the Martian invasion, develops a new ray gun and then embarks on a counter-invasion of Mars. Possibly Last and First Men (1930) by Olaf Stapledon, which follows the development of humanity for hundreds of millions of years into the future and where the Fifth Men invade and colonise Venus when Earth becomes uninhabitable. Possibly the late 19th century A Yarn of Some Other Century, an anonymous novel in which humans invade Venus. Possibly A Conquest of Two Worlds (1932), a novelette by  Edmond Hamilton, in which humans conquer Mars and Jupiter against bitter opposition from the natives. Possible H Beam Piper's novel Little Fuzzy  (1962) where the planet Zarathustra is invaded and conflict erupts with the local Fuzzies. Possibly "A True Story", written in the second century AD by Lucian of Samosata, where the heroes travel to the Moon and attack the King of the Moon.