Mateusz Morawiecki was speaking after talks in the Hungarian capital with his counterpart Viktor Orban.
Morawiecki said that the European Union and its executive arm, the European Commission, did not have a “treaty mandate” to force "sovereign member states" to take in refugees.
"It is up to individual states whether they want to accept someone or not, and we hold very firmly to this position," Morawiecki added.
Poland follows a policy of providing assistance to those in need “on the spot,” Morawiecki also said.
Meanwhile, Hungary's Orban told reporters at a joint news conference that "EU migration policy has not only failed to function well, but ended in a fiasco.”
Polish officials have repeatedly said that Poland is supporting those in need by increasing humanitarian aid to the victims of the war in Syria and by working with aid organisations to rebuild hospitals.
Poland’s previous Prime Minister Beata Szydło has said that helping in this way is not only cheaper but more effective, whereas EU migration policy was not putting a stop to additional waves of migrants to Europe.
Szydło also noted that migrants were not interested in staying in Poland but wanted to head for richer countries.
Poland has contributed EUR 1 million to the European Development Fund, the EU's main instrument for providing development aid to African nations, with the government pledging a further EUR 7 million in aid, according to reports.
Regional ties, infrastructure
In addition to migration policy, the Polish and Hungarian prime ministers discussed issues including regional cooperation and infrastructure projects in Central Europe when they met in Budapest on Wednesday, according to officials.
The two countries’ foreign ministers, Poland’s Witold Waszczykowski and Hungary’s Péter Szijjártó, accompanied Morawiecki and Orban during their talks at the Hungarian parliament.
While in Budapest, Morawiecki was also scheduled to meet with Hungarian President János Áder later in the day.
The Budapest trip marked Morawiecki’s first bilateral visit since he took over as Poland’s prime minister in December.
Morawiecki’s first foreign trip as prime minister was to attend a European Union summit in Brussels in mid-December.
While in Brussels, he met with officials including French President Emmanuel Macron.
During a visit to Warsaw in September, Hungary's Orban said that the European Union would be worse off without Poland and Hungary.
Orban also praised Poland's economic performance at the time and said Poland was one of the European Union's most successful countries.