Antibiotic resistance, fueled by irrational prescribing, is a global threat associated with health, social, and economic consequences. Understanding antibiotic prescribing behavior and associated factors is important to promote good prescribing practice. This study aimed to determine the factors affecting antibiotic prescribing behaviors of physicians based on the theory of planned behavior in hospitals in northwest Ethiopia in 2022. A cross-sectional study was conducted from September 2022 to October 2022. A total of 185 health professionals were included, and a self-administered questionnaire was used to collect data. A structural equation model based on the modified theory of planned behavior was used to determine factors affecting antibiotic prescribing behavior. The percentages of physicians' estimated prescriptions for patients with upper respiratory tract infections (URTIs) and during weekly outpatient visits were used to predict antibiotic prescribing behavior and finally linked with behavioral constructs. A P value <.05 was considered significant. Physicians estimated that they prescribed antibiotics for 54.8% (9896/18,049) of weekly outpatient encounters, and 178 (96.2%) of the 185 physicians estimated they prescribed antibiotics for patients who presented with symptoms of a URTI. Physicians aged ≤30 years were less likely to prescribe antibiotics (48/100, 48%) for patients who presented with a URTI than physicians older than 30 years (51/100, 51%; P=.004), and general practitioners were less likely to prescribe antibiotics (47/100, 47%) for patients who presented with a URTI than residents (51/100, 51%; P=.03). Similarly, during outpatient visits, physicians ≤30 years old were less likely to prescribe antibiotics (54/100, 54%) than physicians older than 30 years (57/100, 57%; P<.001), male physicians were less likely to prescribe antibiotics (53/100, 53%) than female physicians (64/100, 64%; P=.03), and general practitioners were less likely to prescribe antibiotics (53/100, 53%) than residents (57/100, 57%; P=.02). Physicians with good knowledge were less affected by perceived social pressure (mean 4.4, SD 0.6) than those with poor knowledge (mean 4.0, SD 0.9; P<.001) and felt it was easy to make rational decisions (mean 4.1, SD 1.1) compared with those with poor knowledge (mean 3.8, SD 1; P<.001). However, intentions to reduce and prescribe antibiotics were not affected by attitudes, subjective norms, or perceived behavioral control, and perceived antibiotic prescribing behavior was not related to intentions to reduce or prescribe antibiotics. Antibiotic prescribing behavior was not under the volitional control of physicians. This calls for a systematic approach to change antibiotic prescribing practices in hospital.