The incredible events of this novel, combining the features of both an essay, and utopia, and a philosophical and satirical novel, take place at the turn of the 18th and 19th centuries. His hero, Baron Cosimo di Rondo, at the age of twelve, protests against boiled snails served every day for dinner, climbs up a tree and decides to spend his whole life there, setting himself as a rule never to touch the ground. And so, strictly fulfilling his decision, young Cosimo begins to equip his life in the trees.
Learning to move from tree to tree, he enters the garden of the Marquis d’Ondariva, where he meets his daughter Viola. However, their friendship does not last long - the girl will soon be sent to a boarding house.
Cosimo’s supply is his younger brother Biagio - he wears blankets, umbrellas, food and everything necessary for life. The humble abbot Fochlafler, who teaches his brothers all sciences, gives Cosimo lessons in the open air. Biagio sees his older brother, "sitting on an elm branch and hanging legs, and the abbot down below, in the middle of the lawn on a small bench," repeating hexameters in one voice. Then Biagio watches as the abbot, "dangling with long thin legs in black stockings," tries to sit on a tree branch.
Cosimo successfully hunts and, like Robinson Crusoe, sews clothes for himself from the skins of the animals he killed. He tames the dachshund forgotten by Viola and calls her Ottimo Massimo, believing that the girl will like it.
Cosimo fishes, catches bee swarms and gradually ceases to observe the customs established in the family, such as going to mass, and less and less appears on an oak branch near the open window of the church.
In the forest where Cosimo lives, the robber Lesnoy Dzhan is the boss. Once, when a young baron sits on a branch and reads "Gilles Blaza" by Lesage, Lesnoy Dzhan jumps into a clearing: heirs are chasing after him. Cosimo saves the robber, and he asks him to read a book. A touching friendship is struck between them. Now all the books from the home library that Biagio carries to his brother are also read by Forest Jan, from whom they return "disheveled, with mold spots and traces of snails, because God knows where he kept them." The robber gets used to reading, and “soon for the brother, always driven by the voracious robber, reading from a half-hour fun turned into the main occupation and the main goal”, because before he gives the book to the robber, he has to at least browse it: Lesnoy Dzhan is legible and does not read bad books. Gradually, the formidable robber is imbued with an aversion to “criminal and vicious people”, ceases to engage in his robber business, ends up in prison, and then on the gallows - like the hero of the last book he read.
During his acquaintance with the robber, Cosimo develops an indefatigable passion for reading and serious pursuits. He himself seeks the abbot Aoshlaflera and demands that he explain to him a particular subject. The kindest abbot writes the latest books for his pupil, and gradually rumors are circulating around the district that in the castle of Baron di Rondo lives "a priest who watches over all the most sacrilegious books in Europe." The church tribunal arrests the abbot, and he has to spend the rest of his life in a “prison and monastery”. Going hunting Cosimo does not have time to say goodbye to his mentor. Cosimo enters into correspondence with the leading scientists and philosophers of Europe. Unfortunately, these letters are completely lost - “they must have been corroded by mold and bitten by squirrels”.
Reading the “Encyclopedia” of Didro and d’Alembert, Cosimo is imbued with the desire “to do something for the good of his neighbor”. With the help of Ogtimo Massimo, he prevents a forest fire, and then saves the surrounding inhabitants from Muslim pirates.
Despite his hectic life, Cosimo does not feel satisfaction: he still has not met love - how to find love on trees? Suddenly, he learns that a whole colony of Spaniards lives in trees in Olivbass, and immediately embarks on a journey through the forests, "with great risk overcoming areas where there is almost no vegetation."
In Olivbass, a colony of exiles - Spanish feudal lords, who rebelled against King Charles III because of some privileges - was really located on the trees. Cosimo gets acquainted with Ursula and learns the mystery of love. Soon the Spaniards receive forgiveness, they descend from the trees and leave; Ursula's father calls Cosimo with him - by marrying his daughter, he will become his heir. The young man refuses: “I settled on the trees before you, I will stay on them after you too!” - he answers.
Arriving home, Cosimo is seriously ill. After recovering, he, forced to sit motionless on a tree, begins to write “The Draft Constitution of an Ideal State Located on Trees,” which describes an imaginary elevated republic inhabited by just people. He sends his work to Diderot. Rumors about Cosimo roaming around Europe, newspapermen in their fabrications put him somewhere "between the hermaphrodite and the siren." Viola returns - she grew up and became a real beauty. Children's affection turns into a stormy passion. “For Cosimo, and for Viola, too, the most beautiful time began in life, she ran along the fields and roads on her white horse and, seeing Cosimo between the foliage and the sky, immediately got off the horse, climbed the curved trunk and dense branches” . Lovers know each other and themselves. But time passes, passionate lovers quarrel and leave forever.
After that, "Cosimo walked in tattered trees for a long time, sobbing and refusing food." The baron is embraced by madness. It was during this period that he mastered the art of printing and began to publish brochures and newspapers. Gradually, reason returns to Cosimo; he becomes a freemason, the journal published by him is called "Intelligent Vertebrate."
Freedom winds blow over Europe, a revolution is taking place in France. Cosimo helps locals get rid of tax collectors and tax collectors. A freedom tree is planted in the village square, and Cosimo with a three-colored cockade on a fur hat from the top makes a speech about Russo and Voltaire.
Cosimo safely destroys the Austrian regiment that has sunk into the forest and inspires a detachment of French volunteers under the command of the poet, Lieutenant Papillon. Soon, French troops from the republican became imperial and pretty outlined to the locals. Having traveled around Italy after the coronation, Napoleon meets the famous "patriot living in trees" and says: "If I were not Emperor Napoleon, I would like to be a citizen of Cosimo Rondo!"
Cosimo is aging. Napoleon’s army was defeated on the Berezina, the British landed in Genoa, everyone is waiting for new coups. The nineteenth century, starting badly, continues even worse. “The shadow of the Restoration loomed over Europe; all reformers, whether Jacobins or Bonapartists, are defeated; absolutism and the Jesuits triumph again, the ideals of youth, the bright lights and the hopes of our eighteenth century - everything turned to ashes. " Unfettered Cosimo for days lies on a bed set on a tree, basking near a brazier. Suddenly, a hot air balloon appears in the sky, and the minute he flies past Cosimo, he "with a truly youthful dexterity" grabs his dangling rope with an anchor and, carried away by the wind, disappears into the sea distance.
"So Cosimo disappeared without giving us comfort to see how he returns to earth even dead."