Both sides had initialed a draft deal in June after seven months of negotiations. The EU is one of Kenya's biggest export markets.
The deal was approved by the European Union Council last week. It will now be presented to the parliaments of both sides for ratification before it comes into force.
"Today's agreement heralds a new dawn where Kenyan goods gain immediate duty- and quota-free access to the European market," Rebecca Miano, Kenya's trade minister, said before signing the agreement at a ceremony in Nairobi.
"Over time, European goods will also gain preferential access to the Kenyan market."
Kenya is a major exporter of tea, coffee, flowers, fruits and vegetables to the EU, which accounts for 21% of its overall exports. It buys machinery, pharmaceuticals and other chemicals from the EU.
Bilateral trade between the two stood at a total of 3.3 billion euros in 2022, EU and Kenya government data showed, making it the East African nation's second largest trade partner.
Your browser doesn’t support HTML5
Kenya signed an initial trade deal with the EU in 2016, alongside its partners in the then six member nation East African Community trade bloc, but it was not signed by most of the EAC countries and therefore did not fully come into effect.
The EAC has since expanded to eight member nations, who will all be welcome to join the new deal, Kenya's President William Ruto said.
"This agreement that we are signing today leaves the door open, and I say, wide open, for our EAC partners to join," Ruto said at the ceremony.
While the other EAC members are classified as least developed countries, meaning their exports could continue to get access without the deal, Kenya is middle income and therefore had to seek a stand-alone arrangement.
"We encourage the other Eastern African countries to join," EU Commission President Ursula von der Leyen said.