The Hungarian government placed advertisements in the Lebanese press on Monday warning of "the strongest possible action" against anyone attempting to cross its borders illegally.
The full-page advertisements in both Arabic and English came two weeks after Denmark placed similar adverts in Lebanese newspapers in a bid to stem an influx of migrants and asylum-seekers.
Lebanon hosts more than 1.1 million of the four million Syrians who have fled their homeland since 2011, some of whom are now heading to Europe as the continent faces its biggest migration crisis since World War II.
"Hungarians are hospitable, but the strongest possible action is taken against those who attempt to enter Hungary illegally," the adverts warned.
"Do not listen to the people smugglers. Hungary will not allow illegal immigrants to cross its territory."
Last week, Hungary introduced tough new laws giving courts the power to jail people for up to three years for crossing its borders "illegally", rising to five years if they damage its frontier fences.
Hungary has built a razor-wire fence along the entire length of its border with Serbia and last week hastily erected a barrier along the 41 kilometres (25 miles) of its border with Croatia which is not formed by the hard-to-cross Drava river.
The right-wing government in Budapest has come under heavy criticism for its treatment of migrants, particularly over the police's handling of clashes at the flashpoint Serbian border crossing of Roszke.
Prime Minister Viktor Orban has said he is only applying EU regulations and blames Greece for waving the migrants through and Germany for relaxing asylum rules for Syrians.
In its adverts earlier this month, Denmark warned that it had tightened its own regulations concerning refugees.