Objectives California and Massachusetts are the only 2 states in the United States with municipalities that have local laws prohibiting the sale of tobacco products by pharmacies. The impacts of the tobacco-free pharmacy laws remain understudied. This study aims to fill this gap by examining the association between tobacco-free pharmacy laws and smoking prevalence among adults over time in California and Massachusetts. Design This study used a series of cross-sectional surveys. The data source for this study was the Behavioral Risk Factor Surveillance Survey for each year from 2005 to 2013. Setting The longitudinal changes in smoking prevalence at the city or county level were estimated and comparisons were made between cities or counties with tobacco-free pharmacy laws and those without the laws. Participants The participants used to estimate smoking prevalence were representative of adults within California and Massachusetts. Intervention The implementation of tobacco-free pharmacy laws was considered to be the intervention in this study. Main outcome measures The outcome measures were smoking prevalence among adults. Mixed-effects negative binomial models were performed primarily to examine longitudinal changes in outcome measures. Results The prevalence of smoking decreased in both states over time. In Massachusetts, there was a statistically significant decrease in smoking prevalence among cities with tobacco-free pharmacy laws compared with those without such laws. Despite the presence of an 8.6% decrease in prevalence after the implementation of tobacco-free pharmacy laws, this reduction was not statistically significant after controlling for the negative trend in smoking rates overall and other factors. Conclusion This study evaluated tobacco-free pharmacy laws with regard to the real-world impacts. Our findings highlight the need for future research on the effects of tobacco-free pharmacy laws with a prolonged time span and a comprehensive understanding of the law's implementation and enforcement.