The madman in Gogol's story is a clerk.
In the story, the madman is called Aksenty Ivanovich Poprishchin. He is castigated by the chief clerk for setting his sights on the director's daughter. The chief clerk accuses Poprishchin of being too ambitious; he maintains that Poprishchin is too homely to attract a woman of consequence, such as the director's daughter.
Poprishchin does not agree. In fact, he dismisses the chief clerk's words. To Poprishchin, his supervisor is merely a councillor, while he himself is a titular councillor. Despite this, Poprishchin is deeply unhappy. He is poor and lives an impoverished life.
Poprishchin longs to be promoted, but he laments that the opportunity does not appear. Later in the story, however, Poprishchin begins to fancy himself a king. In the diary entry "The year 2000: April 43rd," Poprishchin announces to Mawra (his housekeeper) that he is actually the king of Spain. By this time, Poprishchin does fit the bill of the "madman" in the story's title. In fact, his mental state is revealed by his proclamation that the human brain does not reside in the head. Instead, Poprishchin insists that it is "carried by the wind from the Caspian Sea."