Spain's government said it will also chair a meeting of the United Nations Counter-Terrorism Committee tomorrow, 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 radicalised and travelling abroad as "foreign terrorist fighters" (FTF) -- and how to prosecute and rehabilitate those that return.
Such fighters "represent one of the most pressing and worrying threats to international peace and security," Madrid added in a statement.
More From This Section
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.
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.