EU heads of state and government, including Poland's Prime Minister Donald Tusk, made the decision at a summit in Brussels, Polish state news agency PAP reported.
European Council President Charles Michel said: "The European Council has decided to open accession negotiations with Ukraine and Moldova."
EU leaders also granted candidate status to Georgia and pledged to open accession talks with Bosnia and Herzegovina, "once the necessary degree of compliance with the membership criteria is reached."
Michel said the move represented a "clear signal of hope for their people and for our continent."
Ukraine's President Volodymyr Zelensky said: "This is a victory for Ukraine. A victory for all of Europe. A victory that motivates, inspires, and strengthens."
Hungary's Prime Minister Viktor Orban, who had vowed to block accession talks with Ukraine, abstained in a key vote, public broadcaster Polish Radio's IAR news agency reported.
Orban said afterwards he did want not take part in what he called a bad decision.
The decision came as Ukraine's fight against the Russian invasion nears the two-year mark, and US President Joe Biden's USD 61 billion military aid for Kyiv has stalled in Congress, the Reuters news agency reported.
EU leaders warned earlier on Thursday that not agreeing to start negotiations would be seen as a victory for Russian President Vladimir Putin.
Thursday is day 659 of Russia's war on Ukraine.
Russia invaded Ukraine on February 24, 2022, launching the largest military campaign in Europe since World War II.
(pm/gs)
Source: IAR, PAP, Reuters, European Council