Put on eye protection and a dust mask. Situate a ladder under where the sheetrock needs to be patched. Climb the ladder and cut a hole into a square shape with a saw. The square edges should be even to patch the ceiling properly. Measure the cut square with a tape measure.
Cut a section of sheetrock or drywall with a saw to match the measurements. Place the cut section into the square hole in the ceiling and attach to the studs with drywall screws using a screw gun. Tape the joints with drywall tape.
Spread a thick layer of joint compound over the sheetrock ceiling patch with a putty knife, going about six inches out from the edges to make the ceiling patch blend into the sheetrock. Dry the joint compound with a heat gun or hair dryer for about twenty to thirty minutes.
Sand over the patch and joint compound with sandpaper until smooth. Apply a coat of primer to the ceiling patch with a brush and let dry as long as the manufacturer recommends. Paint over the patch and primer using a matching paint.