Porcine reproductive and respiratory syndrome virus is a positive-stranded RNA virus of the family Arteriviridae. The Gp5/M dimer, the major component of the viral envelope, is required for virus budding and is an antibody target. We used alphafold2, an artificial-intelligence-based system, to predict a credible structure of Gp5/M. The short disulfide-linked ectodomains lie flat on the membrane, with the exception of the erected N-terminal helix of Gp5, which contains the antibody epitopes and a hypervariable region with a changing number of carbohydrates. The core of the dimer consists of six curved and tilted transmembrane helices, and three are from each protein. The third transmembrane regions extend into the cytoplasm as amphiphilic helices containing the acylation sites. The endodomains of Gp5 and M are composed of seven β-strands from each protein, which interact via β-strand seven. The area under the membrane forms an open cavity with a positive surface charge. The M and Orf3a proteins of coronaviruses have a similar structure, suggesting that all four proteins are derived from the same ancestral gene. Orf3a, like Gp5/M, is acylated at membrane-proximal cysteines. The role of Gp5/M during virus replication is discussed, in particular the mechanisms of virus budding and models of antibody-dependent virus neutralization.