Low Earth Orbit (LEO) satellite networks are expected to enable global connectivity for next-generation communications. To provide space-centric solutions, the limited coverage time and limited resources of LEO satellites pose challenges to maintaining service continuity and ensuring low latency for users. Furthermore, LEO satellites rely on solar panels to obtain energy, so a balance needs to be struck between energy consumption and service provision for satellite mobile edge computing. In this paper, we aim to achieve space-centric computational task offloading in LEO satellite networks. The goal is to minimize end-to-end task offloading latency while considering the constraints posed by the limited onboard computing, storage, and energy resources in constantly moving LEO satellites. To achieve this, we formulate a joint problem of service migration and power control in energy-harvesting LEO satellite networks. The problem is then converted into a Markov decision process (MDP) and solved with SpaceEdge, a novel algorithm based on Deep Reinforcement Learning (DRL). SpaceEdge offers supports for both centralized learning and multi-agent learning. Simulation results show that SpaceEdge, particularly the multi-agent model, outperforms existing solutions, demonstrating its effectiveness in deploying space-centric task offloading services in LEO satellite networks.