Mark one side of the cactus with chalk and take note of the direction it's pointing. Cacti often develop uneven resistance to sun damage, and marking one side will ensure your cactus is not damaged by being reoriented improperly.
Loosen the soil approximately 6 inches from the plant, using a shovel. Push the shovel under the cactus and carefully leverage it out of its resting place. If the plant does not come out readily, loosen more soil rather than risk damaging the roots. Tie a length of garden hose around the cactus to make a handle, and use it to lift the cactus from the hole.
Prepare the cactus for transplanting by trimming off any damaged roots. Leave the cactus unplanted and in a shady spot for at least two days -- so the roots can heal from any damage received while being dug up. Prepare the new planting site while the cactus roots are drying. Create an environment where the soil will drain quickly, but retain some nutrients by adding compost to sandy soils or a combination of pumice and compost to clay soils.
Dig a shallow but wide hole in the prepared area and place the extra soil on a tarp. Lift the cactus, using the garden hose, onto a hand truck fitted with a thick piece of foam. Take extra care not to damage the cactus spines or ribs. Move the cactus in to the hole, and properly orient it using the chalk mark. Refill the hole with the soil on the tarp.
Water the soil around the cactus immediately after transplanting and again at least twice a week, unless the nighttime temperatures dip below 60 degrees F. Water once a month during cooler temperatures. If moving a cactus in summer, cover it with a shade cloth for several weeks, until new growth appears.