"Nobody wants the bloodshed to continue. Nobody, least of all the Ukrainians," he told the Scottish Labour Party conference in Glasgow.
"But after everything that they have suffered, after everything that they have fought for, there could be no discussion about Ukraine without Ukraine, and the people of Ukraine must have a long-term secure future."
Starmer visits Washington on Thursday in the footsteps of French President Emmanuel Macron, who will meet Trump on Monday, exactly three years after Russia invaded Ukraine.
Both leaders are expected to try to convince Trump not to rush to a ceasefire deal with Russian President Vladimir Putin at any cost, keep Europe involved in the process and discuss military guarantees to Ukraine.
On Friday Trump told the Brian Kilmeade Show on Fox News Radio that Starmer and Macron "haven't done anything" to end the war in Ukraine.
Starmer said on Sunday that the need to maintain solidarity with Ukraine is not only right morally, but is also in Britain's national interest.
"Instability in Europe always washes up on our shores, and this is a generational moment," he said.
Starmer said he supports U.S. calls for Europe to take greater responsibility for its security and that Britain will take a leading part.
"We have to be ready to play our role if a force is required in Ukraine once a peace agreement is reached, and we have to be ready to reshape our economy with industrial policy, to stand up for Ukraine, to stand up for Europe, but most of all to stand up for our security."
(Reporting by Paul SandleEditing by David Goodman)
epa11651944 British Prime Minister Keir Starmer (L) welcomes Ukrainian President Volodymyr Zelensky (R) to 10 Downing Street prior to their bilateral meeting, in London, Britain, 10 October 2024. Zelensky is scheduled to travel to France and Italy later in the day. EPA-EFE/TOLGA AKMEN 