Taking the typical ship grillage structure as the study object, this paper mainly describes the ap-plication of optimized design of ship structures. Specifically, the size and shape optimization is applied onto the grillage structure at the bottom, with the weight of the structure being objective and the stress being the constraint condition. After optimization, the weight has decreased by 15.82%. As for deck grillage, to im-prove the spatial layout of the top of superstructure cabins, raise the natural frequency of grillage structure on top, and seek for the optimal distribution of materials, the topology optimization is applied with its static analysis and modal analysis being discussed. Based on the above obtained data, the volume fraction is set as the restriction condition of the model, and the structural natural frequency is set as the objective func-tion. Finally, new structure type which optimizes the spatial layout of the top of superstructure cabins are presented, which renders more reasonable material distribution, increases grillage structure's natural fre-quency, and meets expected goals. Research shows that, at present, the grillage structure design can be widely used in the topology and shape optimization design technology.