Mr. Obama had spoken in Warsaw to mark 25 years since the fall of communism in Poland, he praised Polish democracy as a beacon for neighboring Ukraine.
“How can we allow the dark tactics of the 20th Century to define the 21st?” he said.
In the meantime Mr. Obama met Ukraine President-elect Petro Poroshenko, and pledged support for plans to restore peace to the country.
Mr. Obama called Mr. Poroshenko a “wise selection” to lead Ukraine, and said the nation could become a vibrant, thriving democracy if the world community stood behind it. Mr. Poroshenko was the president-elect in May.
Mr. Obama pledged $5 million of military assistance to Kiev, i.e., armor and night-vision goggles.
The aid includes $18 million promised since early March for food, clothes, radios and other equipment.
Mr. Obama arrives in Brussels for upcoming meeting of the G7 major industrial nations, the first since Russia was removed from the G8 in protest over its annexation of Crimea in March.
Both President Obama and Russian President Vladimir Putin will be attending the 70th anniversary commemorations of the D-Day landings in Normandy on Friday. However, the two leaders have no indication for meeting schedule.
Mr. Poroshenko will attend the commemorations of the D-Day on Saturday. He said he did not rule out meeting with Mr. Putin.
He said he was working on a peace plan involving decentralization of power, a wide amnesty and local election, Reuters news agency reported.
In his speech, the US president said that Poland’s long struggle against occupation and tyranny was mirrored in the plight of Ukraine today.
“We will not accept Russia’s occupation of Crimea or its violations of Ukraine’s sovereignty,” Mr. Obama said.
“As we’ve been reminded by Russia’s aggression in Ukraine, our free nations cannot be complacent in pursuit of the vision we share – a Europe that is whole and free and at peace.”
German Chancellor Angela Merkel threatened Russia with further sanctions if Moscow failed to rein in separatists in eastern Ukraine.
“It is decisive that President Putin use his influence to get the separatists to refrain from violence and intimidation, hand over their weapons and stop the occupations,” she said in a speech to parliament.
Meanwhile, separatist rebels have taken two-military bases in the eastern region of Luhansk.
Separatists hold a border guard base after days of heavy combat, and a National Guard base after an attack which began on Tuesday.
Fighting continues near the towns of Krasny Liman and Sloviansk in neighboring Donetsk region.
Ukrainian sources say rebels are trying to break out of encirclements by government forces.