Technological developments in wireless sensor networks (WSNs) provide a sustainable solution for precision smart agriculture, efficiently using resources and tools to manage and monitor the different parameters to achieve better productivity and output quality. In this paper, we propose a novel cattle behavior monitoring system using LoRaWAN (Long Range Wide Area Network). Thanks to LoRa technology, the system can run on low power and communicate wirelessly with an internet-connected gateway to the cloud over long distances. With an average received signal strength indicator (RSSI) varying from -122.0 to -81.0dBm, the gate coverage is established in the entire 780mx530m area of the dairy farm. Automatic classification of animal behavior can provide useful information for identifying healing problems or disease risks for animals that significantly impact actual breeding and reduce the economic and health costs associated with the disease. A LoRa-based sensor tag is initially attached to the cattle collar as a node. The proposed system was tested on a real dairy farm in Vietnam for two weeks, collecting environmental data by temperature and humidity as well as information about cow behavior (accelerometer and gyroscope). In addition, a new intelligent and efficient crawling behavior recognition system is demonstrated based on the combination of accelerometer and gyroscope data. These acceleration and gyroscope data from two sensors were synchronized to increase the accuracy of cattle behavior classification. As a result, we can significantly increase the amount of data available for classification. Walking, feeding, lying, and standing are the four cow behaviors identified by our method. Four deep learning models were used (SVM, Decision Tree, 1D-CNN, and LSTM).