Commuting behavior cannot be fully captured by a simple intra-urban/intercity distinction, as commuters differ in spatial extent, departure-time regularity, route repetition, workplace stability, and commuting-chain complexity. However, existing studies have largely focused on a single spatial scale or conventional residence–workplace relationships, leaving the trajectory-embedded heterogeneity of commuting behavior insufficiently characterized. This study develops a Trajectory-based Commuting Framework (TCF) using monthly individual trajectory data to identify commuting behavior types, compare behavioral differences, and interpret the mechanisms underlying different commuting patterns. The framework integrates activity segment and trip extraction, residence and workplace inference, commuting indicator construction, type-based comparison, and mechanism interpretation. Within this framework, a Trajectory-based Commuting Type Identification Method (TCTIM) is proposed as the core classification module. It characterizes individual commuting behavior from temporal regularity, spatial scale, workplace stability, trajectory repetition, and commuting-chain complexity, and classifies commuting behavior into regular intra-urban commuting, regular intercity commuting, flexible intra-urban commuting, flexible intercity commuting, and hybrid multi-location commuting. Using one month of mobile phone signaling data from Zhejiang Province, China, the results reveal that commuting heterogeneity cannot be fully explained by the conventional intra-urban/intercity distinction. More importantly, commuting stability and efficiency are not simply determined by spatial distance. Some intercity commuters maintain stable departure times, high route repetition, and relatively efficient travel patterns, whereas some short-distance intra-urban commuters experience pronounced detours and efficiency losses. The XGBoost-SHAP results further indicate that residence–workplace OD distance, departure-time characteristics, route repetition, and commuting-chain complexity are key determinants of commuting type formation. This study extends trajectory-based commuting typology identification methods and provides empirical evidence for understanding commuting heterogeneity and formulating more targeted transport governance strategies.