The use of generic drugs reduces healthcare expenditures, especially for those of lower socio‐economic status. This research employs a descriptive research design and utilizes a cross‐sectional survey to investigate the behavioral intention of patients toward generic medicines, supported by the theory of planned behavior. A structured instrument was used to gather data from 410 respondents who were aware of and consuming generic medicines. A structural equation modeling (SEM) analysis was performed with the semopy library in Python programming. The results demonstrate that all the constructs, namely, attitude, subjective norm, and perceived behavioral control in relation to buying generic medicines, have a significant relationship with behavioral intention to purchase generic medicines. Among all three constructs, perceived behavioral control has the strongest link with behavioral intention. Furthermore, family monthly medical expenses moderate the relationship between all three constructs of planned behavior and behavioral intention. This study could help healthcare professionals and policymakers to understand consumer intention and design information and educational programs accordingly to increase the awareness and usage of generic medicines. The outcome indicates that consumers prefer to purchase generic medicines due to the similar active ingredients, dosage, side effects, and effectiveness, as well as the low cost compared to branded ones.