The writers had advisors who worked within the government and many of the stories were based on real situations. For example, in season three, episode four, "The Moral Dimension", they go to an Arab country where alcohol is not allowed, and so they set up a "communications room" in the embassy where they keep a stash of booze so they could slip out and have a drink. This really happened.
A great fan of the series, Prime Minister Margaret Thatcher wrote a sketch for the show with Press Secretary Bernard Ingham, which was recorded and aired as part of the 1984 National Viewers and Listeners Awards. The sketch featured Paul Eddington and Nigel Hawthorne, both of whom are talking to the Prime Minister (played by Thatcher) about her notion to abolish economists. However, Eddington and Hawthorne did not want to do it and were pressured into taking part.
The British Film Institute named this as one of the top ten television programs of all time.
Paul Eddington, Sir Nigel Hawthorne, and Derek Fowlds all disliked having to record the show in front of a studio audience, due to the distractions and often having to pause (sometimes in mid-sentence) to wait for the audience laughter to die down.
Only three episodes in the series, season one, episode three, "The Economy Drive", season one, episode four, "Big Brother", and season one, episode six, "The Right to Know", did not end with the phrase "Yes Minister".