Magnetotelluric (MT) inversion algorithms are an essential tool in exploration geophysics because they provide us with resistivity models of the subsurface. Inverse problems are ill-posed and non-unique. Resistivity models produced by geologically unconstrained MT inversions are typically smooth, which means that the geological interpretations obtained based on the resistivity models will be ambiguous and uncertain. To solve the above problems, geophysicists have made many efforts over the years to introduce any prior information (such as geological structure information and physical property data) into models, which could help to better constrain the inverted model with the inversion algorithms. In the last few years, there has been renewed interest in machine learning techniques. Various machine learning methods have been applied to inversions. Using the fuzzy c-means (FCM) clustering method, geophysicists proposed new inversion algorithms that are capable of building petrophysical information into the inversion. Although the FCM has been used and advanced in previous work, geophysicists concluded that a priori information of the correct number and value of cluster centers is very important for a successful FCM inversion. In fact, it is difficult to obtain the appropriate clustering information in some geophysical survey areas. In this study, we present an effective way to build the petrophysical information for the MT inversion based on FCM clustering algorithm. When the actual petrophysical information is insufficient, considering the characteristics of MT data, we perform a one-dimensional blocky inversion that can clearly identify the interface with distinct electrical property contrast; then, we obtain the number and value of cluster centers from 1D blocky inversion for the further MT inversion with FCM clustering. The algorithm uses guided FCM clustering to improve the model within the iterative minimization during MT inversion. In our MT inversion method, we integrate the geophysical inversion and geological differentiation into a unified scheme, which interact and enhance each other. The resistivity models obtained from the inversion respect the geophysical and petrophysical data and are easy to geologically interpret. We tested the algorithm using two synthetic examples and a field data example.