In the mobile sensor networks, the sink node registers its own events in the network, and when the sensor node finds an event of interest to the sink node, it sends a response message. The data traffic of the communication process in the application scenario has a bursting feature, and sometimes network congestion occurs. Therefore, when designing the data routing protocol, it is necessary to consider how to reduce the communication overhead in the network and improve the success rate of the query. To address this issue, this article proposes a routing protocol for content-based publish/subscribe, which is applicable in mobile sensor networks. The core idea of routing protocol for content-based publish/subscribe is that all sensor nodes in the network are divided into several clusters, and the transmission of sensing events is based on these clusters. The protocol consists of event publishing, subscription, matching, and unsubscribe. The inquirers send subscription information to the network, which are saved in the cluster head network. Published events are also transmitted to the cluster head network and the matching computation is performed. If the match is successful, events will be sent to subscribers, thus improving the success rate of queries. The simulations show that compared with existing methods, routing protocol for content-based publish/subscribe consumes lower matching events transmission energy to obtain a higher success rate. In the case of a large number of published events, the network lifetime of the routing protocol for content-based publish/subscribe protocol can be increased by 28%–54%, and the subscription success rate remains above 80%.