Johnson, 56, received his vaccine at the same hospital where almost a year ago he was put in an intensive care unit and given oxygen via a tube in his nose after he contracted the virus and fell seriously ill. He later said he was so sick that plans were drawn up on how to announce his death.
"I literally did not feel a thing. It was very good, very quick," Johnson said after receiving the injection at St Thomas' Hospital in London.
"I cannot recommend it too highly, everybody when you do get your notification to go for a jab, please go and get it, it is the best thing for you, best thing for your family and for everyone else."
Pictures showed the prime minister wearing a black mask, a shirt and tie with his sleeve rolled up while a nurse gives him the vaccine.
Britain broke its record for the most coronavirus shots given out in one day on Friday and almost half of all adults have received one dose, making it one of the fastest countries in the world to roll out a vaccine programme.
This success has helped the ruling Conservatives regain the lead over the main opposition Labour Party in opinion polls after the prime minister last year was accused of acting too slowly to stop the spread of the virus.
Johnson received his vaccine as European countries on Friday resumed using the AstraZeneca shot after regulators said its benefits outweighed any risks following recent reports of blood clots.
Countries including Germany and France reversed their decision to temporarily pause its use after reports of about 30 cases of rare brain blood clots sent scientists and governments scrambling to determine any link.
The AstraZeneca vaccine, developed by scientists at the University of Oxford, has also been at the centre of tensions between Britain and the European Union, after Brussels expressed anger over the lack of deliveries of the shot coming from Britain.