Spread powdered chalk over the area in your garden or yard you want to edge. Make chalk lines as straight as possible and measure the length to determine how many lengths of railroad ties you need.
Dig a trench over the chalk outline with a shovel. Keep the trench 2 inches wider than the timbers and to your desired depth. Ideally, the depth of the trench should cover at least one-half to three-fourths of the depth of the railroad ties. Collect the dirt in a wheelbarrow or pack it in nearby mounds. Level the base of the trench so the soil is even and firm.
Lower a railroad tie into the trench, starting at a corner. Step back to ensure it is even or use a carpenter’s level to check whether it is plumb. Lift the railroad tie and add or remove soil under it so it is level, if necessary. To cut a railroad tie to your desired length, mark the point over it with a marker and cut over it with a handsaw or circular saw.
Lower another tie into the trench, directly next to the previous one’s end. Butt the joint between the two ties so it is flush and there is no space between them. Repeat the procedure of installing all the ties in the trench until you reach the end.
Drill 3/8-inch pilot holes through each length of timber through which you will insert spikes that hold them in the ground. Using a heavy-duty 3/8-inch power drill, drill a hole through each corner of a railroad tie and one through the middle.
Insert 12-inch spikes through each hole and pound it all the way through with a sledgehammer. The spikes penetrate the soil below to grip the railroad ties firmly in place, providing a permanent edging option that stays despite frost heaving in areas where winters are exceptionally cold.
Pack dirt into the gap between the railroad ties and the trench to completely cover it. Tamp the soil down with your hands and moisten lightly so it settles.