With 93% of the votes for parliament counted, the president's AK Party leads with 43% of the votes, the state news agency Anadolu reports. The main opposition CHP is on 23%.
Crucially, the pro-Kurdish HDP looks set to reach the 10% threshold and enter parliament. This may make it harder for Mr Erdogan's party and its ally the MHP to reach a majority, although currently they are on course to do so.
Voter turnout is high, at almost 87%, the state broadcaster says.
Initial results were thought likely to favour the AK Party, so Mr Erdogan's lead is expected to decrease as more votes are counted.
His opponent accused the state news agency of being manipulative by releasing results from pro-Erdogan areas first.
And, as the BBC's Mark Lowen points out, the opposition is disputing the agency's reports of how many ballot boxes have been opened: