In this paper, a method of optimizing the shape and the stiffness distribution of a thin-walled beam structure is presented. The thin-walled beam can be analyzed by a finite element method based on the beam theory considering shear warping deformation. The objective for the optimization of shape and stiffness distribution is to minimize the compliance of the structure under the condition of a volume constraint. The size ratio of each cross-section and thickness of membrane plates are selected as the design variables. The optimum design problem is solved by sequential linear programming method. By a fundamental example of 2D cantilever beam, the validity of present method is shown. For the application of present method, highrise building models are analyzed as a thin-walled beam with equivalent strain energy. And the applicability of present method for the structural design or design planning of highrise building is investigated.