This paper presents the design and development of a multiple-inputmultiple-output (MIMO) compact antenna with coplanar waveguide (CPW) feed for 5G millimeter-wave applications. It can be operated in the C (4-8 GHz), Ku (12-18 GHz), K (18-26.5 GHz), and Ka (27-40 GHz) with full coverage of the millimeter wave 5G New Radio (NR) n257/n258/n261 bands.The proposed antenna is designed with planar geometry with an element size of 14 mm×19 mm, which makes it compact and achieves a wide operating bandwidth. By the arrangement of orthogonal rotation, the 4-port structure is formed to realize good polarization diversity. The result shows that the MIMO antenna has a stable radiation pattern at the low-frequency band and offers an ultra-wide bandwidth (UWB) of 5-39 GHz (154.5%), isolation of more than 19 dB, and a total footprint of 40 mm×40 mm. ECC<0.04, DG>9.99, CCL<0.4, and MEG<-5 dB have been achieved. The prototype of MIMO is fabricated and measured, and the measured results are in good agreement with the simulation ones. Moreover, the operating mechanism is analyzed by equivalent RLC circuit and surface current distribution. This antenna can be used in a variety of ultra-wideband applications.