The writer made the confession after thanking fans for their positive feedback when the latest episode - which satirised the Leveson inquiry - was screened last night.
"Uber-thanks for your outpouring of positivity after last night's #thickofit Inquiry special. Here's where I have a confession to make...," began Iannucci.
"3 weeks ago, while in LA, I did a weak and foolish thing. I accidentally tweeted a link to what I thought was a #thickofit trail but which was actually a link to a cut of the whole 60 minute #thickofit Inquiry ep."
He continued: "We got the link down after 5 minutes but some of you managed to download it. To those who did, thank for keeping quiet and not spilling any spoilers. I appreciate it hugely."
Iannucci then joked: "Needless to say, if I were a Junior Minister, I would by now have stayed in my post for another week then resigned."
The seventh and final episode in the fourth series of The Thick of It airs next Saturday (October 27) at 9.30pm on BBC Two.
Watch Armando Iannucci talking to Digital Spy about the series below: