Background: As the country with the largest Muslim population in the world, Indonesia faces unique challenges regarding medication use during Ramadan. Proper understanding of Sharia principles in medication use is crucial to ensure therapeutic effectiveness without disrupting fasting rituals. However, many people still lack knowledge about appropriate medication rules during Ramadan. Objective: This study aims to assess patients' level of knowledge and compliance in using medications according to Sharia principles during Ramadan at Cahaya Farma Pharmacy in Semarang. Methods: This study employed a cross-sectional design with a quantitative approach. Data were collected through questionnaires administered to 60 pharmacy visitors aged 17–50 years who agreed to participate. Data analysis involved calculating the percentage of correct answers and categorizing knowledge levels into good (76–100%), moderate (56–75%), and poor (≤55%). Results: 63% of respondents had a moderate understanding of medication use during Ramadan. Most patients correctly recognized that oral medications invalidate fasting (100%), but knowledge about non-oral preparations such as sublingual drugs (5%) and inhalers (55%) remained low. Understanding of dosage schedule adjustments for chronic conditions like diabetes was also limited (5%). Conclusion: Patients' knowledge about Sharia-compliant medication use during Ramadan was at a moderate level. More intensive education is needed, particularly concerning non-oral medications and therapy adjustments for chronic diseases. Collaboration between healthcare professionals and religious leaders could enhance public understanding and promote safe, Sharia-compliant medication practices.