XR technology provides a broad space for the creation of musicals and gives the audience a more aesthetic and real sensory experience. Based on the design of a three-dimensional system to display the beauty of dance, This study uses sophisticated scientific and technological means such as optical motion capture technology, virtual shooting and green back matting synthesis to present the virtual space under the specific situation of musical drama from a 360 degree free perspective in the XR stage virtual scene, and realize the interaction between roles and scenes, so that the audience can be better immersed in it. Taking the local musical "Tang Xianzu" as an example this paper analyzes the free shuttle of actors between the screen, stage and theater under the XR technology, and the aesthetic artistic space construction leads the audience into the dramatic dream written by Tang Xianzu. The ingenious design transforms "emptiness" and "prosperity" into an instant, integrates virtual traditional Chinese drama elements into the real stage, and interacts with real actors to immerse the actors and audience in the extraordinary life course of Tang Xianzu, a great Chinese man.