This paper presents the results of the first accurate study of the energetics of solvation of the well-established agent for photodynamic therapy of cancer–hematoporphyrin dimethylester in the 1-octanol–N,N-dimethylformamide mixed solvent modeling the smooth transition from porphyrin solvation in an apolar lipid-like phase to a polar protein-like environment. Our results do indicate that porphyrin molecule is preferentially solvated by the amide in the physiological temperature range mainly due to the influence of polar functional groups which interact stronger with N,N-dimethylformamide molecules. In contrast, macrocycle itself interacts stronger with 1-octanol which results in some excess of alcohol molecules in its nearest vicinity. Thus, polar side-chains of hematoporphyrin are better solvated in a protein-like environment, whereas macrocycle shows a tendency to be located in a lipid-like phase.