Phase transitions in nano-sized systems are of fundamental importance in a variety of fields, including sustainable energy and the pharmaceutical industries. Here we report the thermal properties of undecylenic acid nanocrystals in silica gel pores of different sizes and the chemical composition of the pores’ surface. The results of N2 absorption at 77 K, thermogravimetric method, powder XRD method, and differential scanning calorimetry were analyzed to gain an insight into the processes accompanying the phase transition. We using a thermodynamic model of nanocrystal melting in an open porous system and analyze temperature dependence of the effective size of pores, as well as the dependence of the specific heat of melting on the effective size of the pores. This model helps us obtain the following properties of the undecylenic acid: the density of nanocrystals, pressure inside the nanocrystal, the relation between the surface tension coefficients and specific entropies on the nanocrystal-porous matrix interface and melt-porous matrix interface. We demonstrate that as the nanocrystals of the undecylenic acid form in the cavities of the porous matrix, the pressure in such nanocrystals, and thus their densities are much lower than pressure and density in bulk crystals of the undecylenic acid. However, when the crystallization of the nanocrystals occurs in the presence of aliphatic chains grafted on the silica gel pore walls, these chains become embedded into nanocrystals. As the result, the character of the change of properties reverses: both the pressure in the undecylenic acid nanocrystals and their density become larger than those for a bulk undecylenic acid crystal. Throughout the paper, we also contrast the behaviour of a polar undecylenic acid in pores with that of nonpolar 1-octadecen molecules.