Ukraine's Petro Poroshenko (C) said the pact was a "symbol of faith and unbreakable will"
Ukraine, Georgia and Moldova have signed partnership agreements with the European Union, in a move strongly opposed by Russia.
The pact - which would bind the three countries more closely to the West both economically and politically - is at the heart of the crisis in Ukraine.
Russian President Vladimir Putin said making Ukraine choose between Russia and the EU would split it in two.
A ceasefire with pro-Russian rebels in east Ukraine is due to end on Friday.
Ukrainian President Petro Poroshenko, in Brussels to sign the pact, said he would take a decision on an extension to the truce when he arrived back in Kiev later on Friday.
Russian Foreign Minister Sergei Lavrov said he would welcome an extension, but not if it were simply an ultimatum for separatists to lay down their arms.
Meanwhile the United Nations refugee agency said there had been a sharp rise in the numbers of displaced people in eastern Ukraine in the past week, with 16,400 people fleeing the area.
The total number internally displaced has reached 54,400, while a further 110,000 people left Ukraine for Russia this year.
Analysis: Steve Rosenberg, BBC News Moscow
There is a general sense of irritation or perhaps even anger here that Moscow has failed to convince countries like Ukraine, Moldova and Georgia not to sign this historic free trade deal today with the EU.
Moscow has economic concerns about these deals - it is worried that the Russian market could be flooded by cheap goods from the EU that would hit Russian producers.
More pressing for Moscow are the geopolitical concerns here - the whole idea of former Soviet states, countries that Moscow still views as being within its sphere of influence, drifting towards Europe and one day possibly becoming part of the EU - that really grates with Moscow, particularly in the case of Ukraine.
There's a lot of concern about what could happen in eastern Ukraine - the ceasefire announced a few days ago by Mr Poroshenko, and the ceasefire announced by armed separatist rebels, is due to expire today. It's unclear how things are going to develop later.
Mr Poroshenko hailed the signing as Ukraine's most historic day since independence in 1991, describing it as a "symbol of faith and unbreakable will".
Mr Poroshenko also said he saw the signing as the start of preparations for joining the bloc.
A ceasefire in eastern Ukraine expires on Friday
OSCE observers were released by pro-Russian rebels early on Friday
"Ukraine is underlining its sovereign choice in favour of membership of the EU," he said.
Meanwhile European Council President Herman Van Rompuy described it as a "great day for Europe".
"The EU stands by your side, today more than ever before," he told leaders of the three countries, adding that there was nothing in the agreements that might harm Russia in any way.
But Russian President Vladimir Putin said that "efforts to force Ukraine into an artificial choice between Russia and the EU had pushed Ukraine towards a split, a painful internal conflict".
Peaceful citizens were the main victims of the conflict, he said, with thousands of people seeking refuge in Russia.
The European Council on Friday issued a policy statement on Ukraine, setting out key steps it expected to happen by Monday, including the return of three key checkpoints to Ukrainian forces and the "launch of substantial negotiations on the implementation of President Poroshenko's peace plan".
Mr Poroshenko set out a 15-point peace plan on 20 June. It involves decentralising power and holding early local and parliamentary elections.
It also proposes the creation of a 10km (six-mile) buffer zone on the Ukrainian-Russian border, and a safe corridor for pro-Russian separatists to leave the conflict areas.
The European Council did not announce any new sanctions against Russia but said that it continued to assess the situation.
Earlier senior Kremlin adviser Sergei Glazyev described Mr Poroshenko as a "Nazi" and said his presidency was illegitimate because parts of Ukraine did not vote in the May elections.
In a BBC interview, he said that Mr Poroshenko had no constitutional right to sign the treaty, which would damage the Ukrainian economy.
However, President Putin's spokesman Dmitry Peskov told Russian media that Mr Glazyev's comments did not reflect the official Kremlin position.
Mr Poroshenko's predecessor Viktor Yanukovych refused to sign the deal under pressure from Russia and protests led to his overthrow.
After this Russia annexed Ukraine's Crimea region and pro-Russia separatists in eastern regions declared independence, claiming that extremists had taken power in Kiev.
Fighting is said to have continued in some areas of eastern Ukraine despite the temporary ceasefire.
In another development, rebels released four international observers captured more than a month ago.
Alexander Borodai, head of the self-styled Donetsk People's Republic, said the members of the Vienna-based Organisation for the Security and Co-operation in Europe (OSCE) had been freed as a goodwill gesture.
More than 420 people have been killed in fighting between pro-Russia rebels and government forces in eastern Ukraine since mid-April, the UN estimates.