The use of duplex stainless steel (DSS) in various fields is promising due to its excellent anti-corrosion properties, but traditional welding can lead to the formation of unfavorable phases that deteriorate its quality. This study aimed to use the rotary friction weld (RFW) technique to prevent the formation of harmful phases in the welding of an S32205 alloy pipe. The welding parameters used included a rotating speed of 20 m/s, a friction pressure of 10 MPa, a friction time of 30 s, and a forging pressure of 30 MPa. The microstructure and mechanical properties of the resulting RFWed joint were investigated. The results revealed that the weld zone exhibited a microstructure consisting of ferrite and austenite phases, with no deleterious phase detected. The ferrite content was measured to be 53.3%, 54.5%, and 68.7% in the base metal, thermomechanical affected zone (TMAZ), and weld, respectively, owing to the rapid cooling rate in the RFW process, which prevented any harmful phase formation in the weld zone. Furthermore, the RFW process successfully produced an ultrafine grain with a ferrite/austenite grain size of 0.40 μm and 0.41 μm, respectively. The weld zone and TMAZ contained more low-angle grain boundaries (LAGBs) compared to the base metal, which was attributed to the dynamic recovery (DRV) within a grain. The high heating and cooling rates and short welding time of the RFW process did not allow sufficient time for the dynamic recrystallization of the microstructure in the weld zone. However, a slight increase in the ferrite content in the weld zone resulted in grain refinement and an increase in the dislocation density, resulting in a slight increase in the 358 HV0.2 hardness and 823 MPa tensile strength of the weld zone. This study offers a novel approach for obtaining ultrafine grain duplex stainless steel pipes with exceptional mechanical properties through the application of RFW.