Recent technological developments have caused a rapid increase in the use of portable devices around the globe. However, these devices comprise limited processing resources that restrict their performance. To overcome this issue, the existing literature provides several frameworks that enable resource sharing through ad hoc clouds. However, these frameworks lack the ability to cater to the omni-directional movements of devices, which adversely affects the cloud stability, thereby, restricting the resource sharing process. To this end, this paper proposes a novel framework, namely Mobility-aware Ad hoc Cloud-based Resource Sharing (MACRS), which aims to enhance resource sharing among devices. To achieve this aim, MACRS proposes a new mobility-aware clustering algorithm that improves cloud stability. Moreover, the proposed framework prevents unfair resource exploitation and introduces an enhanced technique to handle emergency tasks. Furthermore, we employed event-triggered energy valuations’ synchronization, instead of periodic updates, which minimizes network congestion, hence staving off bandwidth wastage. Additionally, MACRS proposes to maintain the local directory at each node, instead of the cellular service provider, to reduce end-to-end delay during energy valuations’ verification and to minimize the overall execution time of tasks. The simulation results demonstrated that MACRS provides considerably improved cloud stability and resource sharing in comparison with eminent frameworks.