The paper introduces an end-to-end mobility-aware computation offloading framework, called MCG, to address challenges in selecting suitable edge/fog devices for computation offloading from mobile devices. MCG incorporates a mobility prediction module to identify user mobility patterns, selects devices based on mobility and location, prioritizes a high-resource majority device, and offloads computations. Experimental results show MCG’s superiority in accuracy and efficiency over existing mobility prediction methods, significantly reducing latency and power consumption during offloading compared to current strategies.