Vicenza, 800 AD. The crude but world-savvy peasant Bertoldo is invited to the court of the Longobard King Alboin, and manages to ingratiate himself with the sovereign through his wit and pranks. Returning to his small village from the naive wife Marcolfa and the retarded son Bertoldino, the farmer Bertoldo finds out that they fell victim of a Fra Cipolla from Frosolone, a swindler monk (Alberto Sordi) who sells fake relics. He sets to recover his property and take vengeance of the monk, with whom ultimately a truce and friendship begins.
After various adventures and involvement with court intrigues (mainly due to the young princess refusal to marry an ugly Bizantine nobleman for political reasons, and the queen pursue of feminine rights and equality), Bertoldo and his entire family get richly rewarded by the king and ultimately admitted to the court of Alboin. The peasant finds in this his demise, as he cannot adapt to the life and food of the noble class, and soon dies of a broken heart. His legacy seems to live on through his baby grandson though, Cacasenno, who gets his name from shitting on the monarch's face with little consideration for rank or titles.