The story starts at the beginning of the XX century, in the last peaceful years before the beginning of the First World War. The action takes place in the peaceful corner of Switzerland, near Davos, in the fancy tuberculous sanatorium of Berggof.
The main hero of the story, a young man from Germany named Hans Castorp, who isn’t sick himself, but has arrived from Hamburg to see and cheer up his cousin Joachim Ziemssem who is in the sanatorium. Hans Castorp plans to have a three-week vacation there, but, as it could happen when you spend lots of time with sick people, in the end of his third week Hans feels bad himself and has to stay and be examined by the doctors too. The examination reveals that he also has tuberculosis, though a beginning phase. The chief doctor of the sanatorium, Dr. Behrens, insists that Hans should stay in the sanatorium until his disease is cured. Trapped in a place without any distinct time when he should leave, Hans realizes with surprise that in the mountains of Switzerland the time has a different pace than on the plains. It is hard to grasp how many days or weeks or even months have passed since Hans was diagnosed and to the end of the novel. In the very end, the author states that Hans Castorp lived in the sanatorium for seven years, but it could be possibly the exaggeration.
The story looks surreal. There is no main line of events and they serve mostly to illustrate the emotions and thoughts of the main characters, compare them and contrast and give them the possibility to show their reaction to the different events happening to them. Most of events are connected with the main existential themes such as love, death and life. The opposite worldviews of the characters also clash: conservative and modern, healthy and sick, hopeful and despaired. Their behaviour represents the whole humanity struggling in the end of XIX century. All the characters belong to sanatorium in one way or another: some of them are doctors free to leave any time, some are patients or visitors as our main character at the beginning. A few of them manage to cure and leave Berggof forever, some of the patients are terminally ill and die, but there are also plenty of new ones to replace them.
One of the first patients Hans Castorp meets in the sanatorium is Mr. Ludovico Settembrini - a mysterious man from the famous Carbonari family, a member of mason lodge and the fierce defender of humanism and progress. Still, his humanitarian worldview contradicts his Italian origin and personality - as passionately as he defends the humane values, he hates Austro-Hungary. He is a brilliant speaker, wrapping both sides of his ideas into a great, ironic and vivid speeches. Mr. Settembrini immediately captures the heart of the young Castorp and becomes his mentor, who has tremendous influence over him and his worldview.
Another patient who has a great impact on Hans Castorp is Madame Clavdia Chauchat - a Russian lady, his forbidden love. The feelings that bloom in his soul contradict everything rational in him: his upbringing, morals and ethical values, given to him in his strict Calvinist family. Hans suffers for a long time, torn apart between his heart and his mind, but never allows himself to show Madame Chauchat his feelings. Lots of time passes before Castorp realises that Clavdia is healthy now and is going to leave the sanatorium. Only this gives him the courage to finally approach his secret love in the safe space of the carnival. They finally have a talk before Clavdia leaves Berggof.
The idleness of sanatorium life urges Hans Castorp to learn new things from the rest of the inhabitants of Berggof. They present to the young man a rich variety of philosophical, scientific and humanitarian ideas. Even the doctors are supportive: Hans Castorp is invited to the lectures on psychoanalysis and gets access to the medical literature. Together with the academical knowledge this experience raises his interest in the problems of life and death. Castorp also starts his musical studies, using the latest invention of technology - gramophone recording. The contemporary music fascinates him, as do the other studies. Gradually, Hans Castorp forgets about his life outside the sanatorium, his work, his family waiting for him. He stops writing to his relatives and seems content with the closed world of Berggof as the only place existing in all the Universe.
But he still has one relative living very nearly - his cousin Joachim, who was the cause of Hans Castorp coming to Berggof on the first place. Joachim isn’t enjoying his new life: he is an ambitious man dreaming about military career. He prepared himself for the army for the big part of his life and he sees his illness and the dreamy slow life in the sanatorium as an annoying obstacle standing between him and his dreams. He repeatedly asks the personnel of the sanatorium when he can leave, but the doctors can’t make him recover faster. Finally, Joachim’s patience ends and he, in despair, ignores all the doctors’ advice and warnings, leaves the sanatorium by himself and finally enlists the army. Joachim is happy, competent and still very ambitious, but his tuberculosis starts to progress in the harsh army conditions. Very soon Joachim, unable to continue his service in the military, is returned to Berggof. Now he is much more eager to stay as he is in need of cure, but the illness progresses too fast this time. No treatment helps Joachim recover and after a short period of time Hans’ cousin dies in the sanatorium.
Still, the number of patients reminds constant almost always and Joachim is replaced by a Jesuit named Naphtha. Curious, Hans Castorp befriends Naphtha very soon, listening now to his ideas and his endless discussions with Mr. Settembrini, whose opponent Naphtha becomes immediately. Naphtha is a huge fan of conservatism and Medieval period in general, considering it a Golden Age of humanity in terms of morals and enlightment. He condemns progress of every misery of humanity and states that the modern bourgeois society is corrupted to the core. Listening to the debates of Naphtha and Settembrini, Hans becomes more and more puzzled. Despite his devotion to his mentor, he should admit that Naphtha can be equally persuading. He starts to agree with them both, taking the side of one or another in any discussion. He lacks the actual knowledge to define who is right and who is wrong and, finally, takes the side of Mr. Settembrini, just because of his personal preferences and friendship with him (and his innate doubts in Jesuit doctrine).
A sudden event disrupts the peaceful pace of Hans’ life. His beloved, Madame Chauchat returns to the sanatorium, but this time with a friend - another man, a wealthy Dutchman named Peeperkorn. Peeperkorn immediately charms everyone in Berggof, disregarding of sex, age and status. There is something magnificent in his personality. He is a living mystery, a strong, competent, independent man. Despite he should have been jealous, Hans feels some strange friendship to the Dutchman, feeling that they share the love to the same woman. When they start to communicate closer, it is revealed that the mystery of Peeperkorn is very grim: his illness is terminal, and he came to Berggof just to spend some time with his beloved in peace and happiness. During one of the walks to the beautiful waterfall, Peeperkorn is happy and bright, entertaining the rest of the company. In the evening they have a heartful talk with Hans Castorp, they drink brotherhood and, despite their difference in age and status, start to talk informally, like brothers or best friend. But at this night, when everyone enjoys the peaceful sleep after such a good day, Peeperkorn takes poison, deciding to die on his own terms. Soon, in despair, Madame Chauchat leaves Berggof, this time forever.
Despite the life in the sanatorium doesn’t seem to change, the irrational and unspeakable anxiety starts to accumulate in the souls of its inhabitants. No one can explain the reasons of it, but, possibly, it is connected with the arrival of the new patient - a Danish man Ally Brand, who possesses some powers that can’t be explained: he can read minds and is able to communicate with spirits. He starts the habit of hosting the spiritual sessions in the sanatorium and almost all of the Berggof dwellers get addicted to them. Mr. Settembrini is one of the few ignoring them, still devoted to the ideas of scientific progress. Despite his taunts, Hans Castorp also develops a habit to participate in the spiritual sessions. But instead of becoming just another kind of amusement, the sessions disrupt the average pace of life. The spiritual matters become the infinite source of quarrels for the people in Berggof, and they all become much more irritated by everything.
The rivalry between the patients intensifies. The disputes between Settembrini and Naphtha become more and more fierce and, finally, when Settembrini claims that Naphtha’s ideals are corrupting the minds of the young people (meaning Hans) and need to be eliminated, Naphtha resorts to blatant insults and both disputants challenge one another to a duel. But when everything is prepared for the duel, Settembrini regains his composure and, returning to his humanistic ideals, refuses to shoot. But Naphtha, driven to the edge, shoots himself in the head to prove his point.
Soon the World War starts and the peaceful life in Berggof comes to an end. Both sick and healthy, the patients start to return to their home to meet their fates. Hans Castorp is among them. He leaves after the heartful farewell to his best friend and mentor Mr. Settembrini. The Italian encourages him to fight for what he considers right and what his heart supports, though he admits that his own heart obliges him to support the other side of the war.
The final scene of the novel contrasts drastically with the measured pace of the main storyline. We see Hans Castorp in the dirty uniform, horrified and despaired. He is running, crawling and falling on the dead bodies of the same young people as he is, just less lucky one. His comrades are around him, similar despaired people trapped in the never-ending horror of the World War I. The fate of Hans Castorp stays uncertain - we don’t see him neither victorious nor dead - but the author clearly shows us that his story is over. His life - his real life - ended when he left the sanatorium and now it is another story, not worth mentioning. But the last paragraph strips us of hope: the chances of Hans to survive are very thin.