Martin Clunes celebrated by hugging the cast and crew for the final time in Port Isaac, Cornwall.
The ITV series has run since 2004.
Onlookers spotted the cast and crew filming the final scene in Treyarnon Bay on Wednesday and Thursday (27, 28).
They said Doc Martin was called to a cliff edge to help save a woman who has fallen into the sea.
The videos show the cast and crew completing a scene around a rockpool.
An onlooker said the crew had to work quickly to get the shots before the incoming tide swept up and over the giant rock pool where they were positioned for the action sequence.
Clunes was said to have flown a drone on Thursday (28), which was the final day.
As holidaymakers looked on, the final ‘cut’ from the director rang out followed by a cheer and round of applause from Clunes, his co-stars and the crew.
Then he appeared to give a speech and they were then seen hugging to celebrate completing the long-running show.