Unlike lipid stability and oxidation studies in commonly used edible oils and margarines, margarines formulated with unconventional oils are not well characterized. This study investigated the effect of heat treatment (HT) on the stability and content of phytosterol in njangsa seed oil (NSO), bush mango oil (BMO), soybean oil (SBO), coconut oil (CCO), and margarines formulated from their blends: BN (BMO and NSO), BS (BMO and SBO), CN (CCO and NSO), CS (CCO and SBO), and commercial margarines (CM1 and CM2). Both oils and margarines were heat‐treated at 130, 170, and 210°C for 10, 15, 20, and 120 min (only oils). Changes in free fatty acid (FFA), peroxide value (PV), para‐anisidine value (AnV), and fatty acid (FA) composition and phytosterol content were determined after 20 min (margarines) and 120 min (oils) of HT and compared to their control/pre‐HT/unheated (UH) counterparts. The FA composition did not change significantly with HT. Polyunsaturated fatty acids (PUFA)‐rich oils such as NSO and SBO showed significantly higher increase in FFA content with HT compared with oils with higher saturated fatty acid content (BMO and CCO). Oils with higher proportions of linoleic acid, such as SBO (68.3%) and NSO (60.35%), had higher AnV at the end of the HT compared with oils with lower content, such as BMO (0.51%). Phytosterol content fluctuated with HT, and changes in content were generally more pronounced in β‐sitosterol than in stigmasterol and campesterol. Both principal component analysis (PCA) and partial least‐squares discriminant analysis (PLS‐DA) were carried out to observe possible clusters. The results suggest that changes in quality and content of oils and margarines during heating are dependent on more than their fatty acid composition.