The novel is a satirical exploration of the moral and political corruption in 19th-century Portugal, following the journey of a virtuous and idealistic provincial magistrate who moves to Lisbon. Initially committed to his principles, he becomes entangled in the city's decadent lifestyle and political machinations, leading to his moral downfall. Through his transformation, the story critiques the societal and political dynamics of the time, highlighting the ease with which integrity can be compromised in the pursuit of power and social acceptance.