Government policies are key to combating climate change and biodiversity loss, however political action requires electoral support. Engaging with the electorate through social media is an integral part of political communications, informing voters on politicians’ voting intentions. Here, we examine whether environmental messaging on Twitter by UK politicians can be used to predict the likelihood of them voting for pro-environmental measures. Using historical Twitter data and voting records, we determine that environmental messaging has increased over the last decade, but the probability of voting environmentally has not. Instead, voting trends are highly heterogenous over time, varying by political party. However, after accounting for party effects, politicians with higher levels of environmental messaging are more likely to vote against party lines in favour of environmental measures. This work suggests that environmental messaging can be used to inform voting intentions, but is a poor predictor compared to political party association.