A major consequence of climate change is the growing precipitation variability around many parts of the world leading to increased occurrences of floods. While there has been a rich literature on flood risk in the urban context, flood risk in the agricultural sector has been understudied. The goal of this study is to estimate the impact of flood risk on farmland values in a watershed with active agricultural activities. The novelty of the study is to use the spatial boundary discontinuities along floodplains as a way to control unobserved spatial heterogeneities in a regression analysis framework. Using parcel-level data from Lancaster County (Pennsylvania, USA), we show that cropland is more vulnerable to potential flood risk compared to noncrop farmland. Specifically, cropland parcels on average experience a 13% (or $3,895/acre in 2015 USD, with the 95% confidence interval being [$510, $7352]) value reduction if exposed to a 1% or higher annual chance of flooding. The flood risk impact on noncrop farmland is statistically insignificant. The difference between cropland and noncrop farmland in valuing the potential flood risk implies different flood preparedness and risk management strategies. Based on the empirical findings, policy implications for flood insurance, agricultural water management, land-use practice, and other flood mitigation strategies are explored.