In this article we use modern approaches from machine learning, data analysis and natural language processing, text mining algorithms and methods to analyze the text of the novel “The Master and Margarita” by M. A. Bulgakov. The paper has the network of the main characters of the novel, based on their interactions with each other and distribution in the text. The links in the network selects the groups of characters with their connectedness in a plot. We also analyzed the changes in the sentiment dynamic of the plot and identified its main characteristics, revealing the complexity of the structure of this work. This dynamics is in good agreement with the content of the work. The effectiveness and efficiency of the proposed approach is demonstrated by the example of microanalysis of the novel.