Remove any grass or other growth from the ditch with a spade. Removing the growth prevents the roots from interfering with the pipes in the future.
Pour about 6 inches of gravel into the ditch, and rake it into a U-shape. Shift the gravel so it slopes down about 1 inch for every 8 feet of distance so water will always flow away from the home.
Lay 4-inch wide PVC perforated drain pipes over the gravel. Connect lengths of pipe with T connectors and turn the open stems upward. Attach drain grids over the open ends to prevent large debris from clogging the pipes.
Shovel another 6-inch layer of gravel over the pipes so water can quickly seep down into the pipes. Roll geotextile material over the rocks as an additional barrier against silt.
Mix sand and dirt in a wheelbarrow and fill the remaining canal until it is about 3 inches from ground level. Rake the mix into a shallow dip so water will continue to naturally flow towards the underground pipes.
Lay flood tolerant grass seed over the dirt and cover it with a thin layer of straw so the seeds won't blow off. The roots help prevent erosion and slow running water so it can drain into the pipes.