With the development of information technology, the introduction of information technology into architectural modelling and façade design and the systematic definition of historic districts is a problem that the architectural industry continues to explore and pursue. As a shape-based and self-defining generation rule, shape grammar provides significant help in the process of the automatic generation of architectural shapes to obtain design results that meet the requirements of the original historic district. Based on the simple combination of the application of shape grammar in architectural design, combined with the field investigation method, the representative buildings in the “Three Lanes and Seven Alleys” historic district are investigated and understood in detail, and the corresponding shape grammar rules are established. The courtyard types of the historic district are divided into: “” shape, “T” shape, “=” shape, “” shape, “” shape, “” shape, “” shape, “U” shape, “” shape, and garden. In detail, the façade components include the entrance, patio, main seat, wings, cloister, pavilion, etc. The elements of its façade include saddle walls, grey sculptures, carved stones, grey tiles, wooden grilles, wooden railings, wood grain flowers, etc. On this basis, parametric design is introduced to convert the design syntax into parametric programs. Grasshopper in Rhino is mainly used to visualize and simulate the regulation, and finally, achieve the purpose of automatically generating the architectural shape and façade of the “Three Alleys and Seven Alleys” historic district by adjusting its parameters.