In this work we have studied the folding pathways for four pairs of homologous proteins from thermophilic and mesophilic organisms from two different structural classes (class a, all-alpha proteins and class d, alpha + beta proteins) using Monte Carlo simulations. We have obtained 50 trajectories for each protein and followed the free-energy profile and the order of folding of secondary structure elements between the last occurrence of the completely unfolded state and the first occurrence of the completely folded state. It turns out that the period of successful crossing of the free-energy barrier between unfolded and folded states for 40-45 trajectories (80-90%) makes 10% of the total folding time for four proteins (1tzvA, 1eyvA, 351c, and 1t4aA) and only 0.1% for two proteins (1dd3, 1ctf). This observation can be explained by a higher free-energy barrier for these proteins (1dd3, 1ctf) in comparison with other studied proteins. We have observed that folding pathways of thermophilic and mesophilic proteins may be the same, partly the same, and different. And similarity or difference between the folding pathways of thermophilic and mesophilic proteins does not depend on the structural class to which these proteins belong. Folding pathways for proteins from both classes correlate with the calculated folding nuclei for these proteins.