In the evolution toward fifth-generation networks, Mobile Edge Computing (MEC) is an emerging paradigm, conceived to meet the ever-increasing computational demands of mobile applications. Within the access range of mobile devices, the MEC technique promises the enablement of efficient Mobile Cloud Computing services.In an MEC system, virtual machine (VM) migration is a key issue; VM migration is the process of moving a VM from an edge node to another edge node. To improve service quality and system performance, the VM migration method has a dual focus on the MEC system's computation and communication resources. In this study, we formulate the VM migration problem as a one-on-one contract game model and develop a learning-based price control mechanism to effectively handle the MEC's resource.By using the game methodology and learning process, our approach is able to capture the dynamics of MEC systems, and it interacts continually with an unknown system environment. Finally, extensive simulation results are provided to demonstrate the capability of the proposed approach in achieving, with respect to existing MEC schemes, both higher resource utilization and system throughput, as well as reduced service drop ratio and reduced service delay.