The development of photoprotective products has been highly focused on natural ingredients, and exposure to ultraviolet (UV) radiation is also related to the production of reactive oxygen species (ROS), which are extremely damaging to tissues. Hymenaea martiana Hayne has flavonoids related to its pharmacological activities, but a flavonoid profile of this species has not been reported yet. In this context, this work aimed to perform high-performance liquid chromatography-mass spectrometry-electrospray ionization-ion trap (HPLC-MS-ESI-IT) to characterize the flavonoids from Hymenaea martiana bark extract and develop a cosmetic formulation with photoprotective action. Total phenolic compounds, total flavonoids, sun protection factor (SPF) and antioxidant activity of the crude extract were determined. An HPLC-ESI-IT profile of flavonoids was developed. Photoprotective gel formulations were developed with the extract of H. martiana. The highest content of phenolic compounds was found in the crude extract, followed by the ethyl acetate fraction. The total flavonoid content in the samples demonstrated that these are the major phenolic compounds. The crude extract showed significant antioxidant and photoprotective activity. A flavonoid profile was developed, and bioactive flavonoids reported in the species were identified. In the development of the formulations, it was evidenced that the addition of the crude extract to the chemical filter increased the antioxidant activity and FPS, suggesting a synergistic effect in the photoprotection. Formulation F4 was considered a promising product. These results show the cosmetic potential of Hymenaea martiana, thus justifying the development of a cosmetic formulation with photoprotective activity.