Chinese Premier Li Keqiang held talks with European Commission President Jose Manuel Barroso and European Council President Herman Van Rompuy on Wednesday evening on the sidelines of a gathering of Asian and European leaders known as the Asia-Europe Meeting in Milan.
"They reviewed the situation in the Middle East, northern Africa and the Sahel (region of Africa) and agreed to increase cooperation to counter the common threat of extremism and terrorism in these regions," an EU statement issued after the talks said, without specifying what kind of cooperation.
China responded cautiously to a call by U.S. President Barack Obama last month for a broad coalition to root out Islamic State militants in Iraq and Syria, saying the world should fight terror but that the sovereignty of countries must be respected.
However, Chinese state media reported last month that Chinese militants from the western region of Xinjiang had fled the country to get "terrorist training" from Islamic State fighters for attacks at home.
Several EU countries are taking part in air strikes against Islamic State targets in Iraq.
The EU and Chinese leaders agreed on the importance of reestablishing peace and stability in Ukraine in accordance with UN principles, the EU statement said.
Both sides also reaffirmed their commitment to finalize as soon as possible negotiations on an ambitious bilateral investment agreement. Talks on the agreement began in January.