Spain's government said it will also chair a meeting of the United Nations Counter-Terrorism Committee on Tuesday, the day after the talks involving international experts.
Spain this year sits on the UN Security Council and has launched a crackdown on "homegrown" jihadists, who it says are leaving to fight with the Islamic State group in Iraq and Syria.
It will host discussions on ways to stop jihadists becoming radicalized and travelling abroad as "foreign terrorist fighters" (FTF) - and how to prosecute and rehabilitate those that return.
The UN said in a statement the meetings aimed to "produce a set of strategies and techniques to guide member states in their efforts to address the FTF threat".
Such fighters "represent one of the most pressing and worrying threats to international peace and security," Madrid added in a statement.
Countries must cooperate "to work against these terrorist organisations as quickly and fluidly" as the armed groups operate, said Jean-Paul Laborde, the UN committee's executive director.
More than 200 experts from 70 countries and about 30 interior and foreign affairs ministers or their deputies are due to attend the two days of meetings.
Officials say between 25,000 and 31,000 such fighters have headed to war zones to join the Islamic State group, also known by the acronym Daesh.
These include hundreds from European countries such as Britain, France, Germany and Spain.
Laborde said leaders need to study "the reasons why young people are drawn to Daesh, and how that can be handled".
The UN Security Council in September 2014 adopted a resolution calling on member states to take measures to stem the flow of foreign fighters, fearing that they may return to launch attacks in their home countries.