Accurate crime spatiotemporal prediction is crucial for crime prevention. However, crime occurrences are influenced by diverse and interacting social factors, resulting in dynamically evolving distributions with non-stationarity and spatial heterogeneity. Most existing methods focus on data preprocessing or architectural enhancements and remain offline models, which limits their generalization capability. To address these challenges, we propose a novel spatial semantic-guided online learning framework. Specifically, we first compute the spatial semantic similarity between urban regions using points of interest. Based on this, we then introduce a contrastive learning objective guided by this similarity during training. This design aims to enhance the model’s ability to capture both the similarities and discrepancies among regions. During the prediction process, an iterative online learning strategy is employed to adapt to dynamically changing crime patterns. By continuously fine-tuning the model with streaming data, the proposed framework improves robustness and generalization under non-stationary crime spatiotemporal distributions. Finally, extensive experiments on real-world crime datasets indicate the effectiveness and stability of our proposed approach.