Most massive stars are members of a binary or a higher-order stellar system, where the presence of a binary companion can decisively alter their evolution via binary interactions. Interacting binaries are also important astrophysical laboratories for the study of compact objects. Binary population synthesis studies have been used extensively over the last two decades to interpret observations of compact-object binaries and to decipher the physical processes that lead to their formation. Here, we present POSYDON, a novel, publicly available, binary population synthesis code that incorporates full stellar structure and binary-evolution modeling, using the MESA code, throughout the whole evolution of the binaries. The use of POSYDON enables the self-consistent treatment of physical processes in stellar and binary evolution, including: realistic mass-transfer calculations and assessment of stability, internal angular-momentum transport and tides, stellar core sizes, mass-transfer rates, and orbital periods. This paper describes the detailed methodology and implementation of POSYDON, including the assumed physics of stellar and binary evolution, the extensive grids of detailed single- and binary-star models, the postprocessing, classification, and interpolation methods we developed for use with the grids, and the treatment of evolutionary phases that are not based on precalculated grids. The first version of POSYDON targets binaries with massive primary stars (potential progenitors of neutron stars or black holes) at solar metallicity.