Plant-associated fungi (endophytic fungi) are a biodiversity-rich group of microorganisms that are normally found asymptomatically within plant tissues or in the intercellular spaces. Endophytic fungi promote the growth of host plants by directly producing secondary metabolites, which enhances the plant’s resistance to biotic and abiotic stresses. Additionally, they are capable of biosynthesizing medically important “phytochemicals” that were initially thought to be produced only by the host plant. In this review, we summarized some compounds from endophyte fungi with novel structures and diverse biological activities published between 2011 and 2021, with a focus on the origin of endophytic fungi, the structural and biological activity of the compounds they produce, and special attention paid to the exploration of pharmacological activities and mechanisms of action of certain compounds. This review revealed that endophytic fungi had high potential to be harnessed as an alternative source of secondary metabolites for pharmacological studies.