On January 23, 2020, the city of Wuhan, China, was sealed off in response to the COVID-19 pandemic. Studies have found that the lockdown was associated with both positive and negative emotions, although their findings are not conclusive. In these studies, emotional responses to the Wuhan lockdown were identified using lexicons based on limited emotion types. This study aims to map Chinese people's emotional responses to the Wuhan lockdown and compare Wuhan residents' emotions with those of people elsewhere in China by analyzing social media data from Weibo using a lexicon based on the circumplex model of affect. Social media posts on Weibo from 2 weeks before to 2 weeks after the Wuhan lockdown was imposed (January 9, 2020, to February 6, 2020) were collected. Each post was coded using a valence score and an arousal score. To map emotional trajectories during the study period, we used a data set of 359,190 posts. To compare the immediate emotional responses to the lockdown and its longer-term emotional impact on Wuhan residents (n=1236) and non-Hubei residents (n=12,714), we used a second data set of 57,685 posts for multilevel modeling analyses. Most posts (248,757/359,190, 69.25%) made during the studied lockdown period indicated a pleasant mood with low arousal. A gradual increase in both valence and arousal before the lockdown was observed. The posts after the lockdown was imposed had higher valence and arousal than prelockdown posts. On the day of lockdown, the non-Hubei group had a temporarily boosted valence (γ20=0.118; SE 0.021; P<.001) and arousal (γ30=0.293; SE 0.022; P<.001). Compared with non-Hubei residents, the Wuhan group had smaller increases in valence (γ21=-0.172; SE 0.052; P<.001) and arousal (γ31=-0.262; SE 0.053; P<.001) on the day of lockdown. Weibo users' emotional valence (γ40=0.000; SE 0.001; P=.71) and arousal (γ40=0.001; SE 0.001; P=.56) remained stable over the 2 weeks after the lockdown was imposed regardless of geographical location (valence: γ41=-0.004, SE 0.003, and P=.16; arousal: γ41=0.003, SE 0.003, and P=.26). During the early stages of the pandemic, most Weibo posts indicated a pleasant mood with low arousal. The overall increase in the posts' valence and arousal after the lockdown announcement might indicate collective cohesion and mutual support in web-based communities during a public health crisis. Compared with the temporary increases in valence and arousal of non-Hubei users on the day of lockdown, Wuhan residents' emotions were less affected by the announcement. Overall, our data suggest that Weibo users were not influenced by the lockdown measures in the 2 weeks after the lockdown announcement. Our findings offer policy makers insights into the usefulness of social connections in maintaining the psychological well-being of people affected by a lockdown.