Public travel behavior and attitudes are critical for urban sustainability, yet evidence on how temperature shapes them across urban forms remains limited. This study develops a nationwide natural language processing (NLP) approach using social media data to examine temperature–transport dynamics in 292 Chinese cities in (Aultman-Hall 2019). We identify travel-related posts and classify three behaviors—physical travel (PT), semi-motorized travel (ST), and motorized travel (MT)—and associated attitudes, yielding over 1.4 million valid entries. Urban scale, population density, green exposure and the urban centers per million residents are used as key urban form dimensions. The relationship between temperature and travel volumes exhibits an inverted U-shape: in the low-temperature range (< 15 °C), a 1 °C increase raises PT, ST, and MT by 0.007, 0.003, and 0.002 standard deviations, whereas in the high-temperature range (> 25 °C) a 1 °C increase reduces them by 0.012, 0.003, and 0.004. Under high temperatures, larger cities and polycentric cities show lower travel volumes, while denser and greener areas maintain higher activity. Temperature has the strongest effect on attitudes toward PT, also following an inverted U-shape. Higher temperatures weaken the positive influence of green exposure on PT and ST attitudes, higher population density is associated with more negative attitudes toward MT, and the ST in polycentric cities also shows negative effects. Our findings highlight how compact urban development and urban greening can buffer the adverse impacts of temperature on travel behavior and attitudes, providing spatially explicit evidence to support climate-sensitive transport and land-use policies.