The distribution of physicians across geography and employers has important implications for the delivery of medical services. This study examines how the political beliefs of physicians influence their decisions about where to live and work. Physician relocation and employment patterns are analyzed with a panel constructed from the National Provider Identifier directory. Data on political donations are used to measure the political preferences of physicians. The "ideological fit" between a physician and his or her community is a key predictor of both relocation and employment decisions. A Democratic physician in a predominantly Republican area is twice as likely to relocate as a Republican counterpart living there; the reverse is also true for Republicans living in Democratic areas. Physicians who do not share the political orientation of their colleagues are more likely to change workplaces within the same geographic area. Physicians are actively sorting along political lines. Younger physicians have trended sharply to the left and are increasingly drawn to urban areas with physician surpluses and away from rural areas suffering from physician shortages. The findings also help explain why physician shortages are more prevalent among left-leaning specialties such as psychiatry. Copyright © 2020 by Duke University Press.