Space-wall-climbing robots face the challenge of stably attaching to and moving on spacecraft surfaces, which include smooth flat areas and rough intricate surfaces. Although adhesion-based wall-climbing robots demonstrate stable climbing on smooth surfaces in outer space, there is scarce research on their stable adhesion on rough surfaces within a microgravity environment. A novel adhesive material is developed inspired by the adhesion mechanism and locomotion of the Gekko gecko. This material exhibits exceptional adhesion across various materials and surface roughness. A variable-stiffness gecko-inspired paw is engineered, generating substantial adhesion forces while minimizing detachment forces. Impressively, this paw generates up to 180 N of adhesion force on smooth surfaces and achieves detachment without external forces. By integrating such variable-stiffness paws with a wall-climbing robot, a gecko-inspired robot effectively operating in a microgravity environment is created. The robotic satellite surface climbing experiments and robotic satellite capture experiments are conducted using a simulated microgravity environment and a satellite model. The results unequivocally demonstrate the gecko-inspired robot's proficiency in executing various functions, including stable motion and capture on both smooth and rough spacecraft surfaces within a microgravity environment. These experiments underscore the potential of adhesion-based gecko-inspired robots for in-orbit services and spacecraft capture and recovery.