It is narrated from Aisha (may Allah be pleased with her) that she said: The Messenger of Allah (ﷺ) would enter the morning in a state of major ritual impurity (janabah), then he would perform ghusl (ritual bath) and observe the fast of that day.
Hadith Referenceمسند الإمام الشافعي / كتاب الصيام / 650
Hadith Takhrijاخرجه البخاري، الصوم، باب اغتسال الصائم (1930) ۔ ومسلم، الصيام، باب صحة صوم من طلع عليه الفجر وهو جنب (1109)۔