Preliminary results gave the party 37.6% of the vote, but it was not immediately clear if that would be enough for it to govern alone.
Its leader Jaroslaw Kaczynski claimed victory, and the outgoing Prime Minister, Ewa Kopacz of the centrist Civic Platform, admitted defeat.
Law and Justice (PiS) has strong support in poorer, rural areas.
Civic Platform, the pro-market party that governed for the last eight years, got 24.1% of the vote.
Three other parties also won enough votes to get seats in parliament: a new right-wing party led by rock star Pawel Kukiz with 8.8%; a new pro-business party, Modern Poland, with 7.6%; and the agrarian Polish People’s Party with 5.1%.
The election authority is expected to announce how many seats the parties get in parliament on Tuesday.
Exit polls suggested Law and Justice would have a small majority – making it the first time a single party has won enough seats to govern alone since democracy was restored in 1989.
We will exert law but there will be no taking of revenge. There will be no squaring of personal accounts,” said Mr Kaczynski.
“There will be no kicking of those who have fallen through their own fault and very rightly so.”