The invention discloses a gantry type self-walking automatic folding and unfolding awning. The awning comprises a folding and unfolding mechanism installed on a carriage and awning cloth covering thefolding and unfolding mechanism. The folding and unfolding mechanism is driven by vertical plates symmetrically arranged on the left side and the right side. A driving chain wheel is arranged on the inner side of each vertical plate; the driving chain wheels on the left side and the right side are driven by the same power assembly, a driven chain wheel is arranged below each driving chain wheel, the driving chain wheels are connected with the corresponding driven chain wheels through chains, idler wheels are coaxially installed beside the driven chain wheels, the idler wheels are matched withrails in a rolling mode, and the rails are fixed to the outer side of the carriage. The folding and unfolding mechanism is driven in a gear and chain transmission self-walking mode, the structure is simple and compact, mounting and operation are easy, the production cost is low, the operation reliability is good, the movement synchronism of the left vertical plate and the right vertical plate is good, the clamping stagnation defect is not likely to happen, it is guaranteed that the awning cloth can be normally folded and unfolded all the time, safety is good, and the folding and unfolding mechanism is suitable for various trucks.