Everton were pushed all the way by Lincoln but advanced to the third round of the Carabao Cup after two late goals gave the Premier League team a 4-2 victory at Sincil Bank.
A shock looked like it could be on the cards when Harry Anderson arrived in the penalty area to convert Jack Payne's cut back and put the Sky Bet League One side in front after only 21 seconds.
Everton dominated the rest of the first half and Gylfi Sigurdsson, Alex Iwobi and Michael Keane all worked Lincoln goalkeeper Grant Smith before Lucas Digne levelled things up with a superb 30-yard free-kick after 36 minutes.
Moise Kean crashed a shot off the post before half-time but it was not until the hour mark that Everton went ahead through Sigurdsson's penalty.
Morgan Schneiderlin went down as he attempted to squeeze in between Harry Toffolo and Michael O'Connor and Sigurdsson made no mistake with his spot-kick, finishing emphatically into the roof of the net.
However, Lincoln would not lie down and Bruno Andrade equalised midway through the second half with a thunderous volley.
Iwobi went close with a dipping shot as Everton's superior fitness and class eventually begin to show late on and it was Iwobi who restored the lead with a close-range header in the 81st minute.
Richarlison ensured Everton's progression with two minutes remaining when he directed his header from Digne's cross into the net.