The sound generated by a vortex pair moving close to a rectangular cylinder is studied by high-resolution simulations of the two-dimensional unsteady compressible Navier-Stokes equations at Mach numbers ranging from 0.05 to 0.3. In this study, the Mach number Ma is defined by Ma=Vt /c0, where Vt is the translation velocity of the co-moving vortex pair and c0 denotes the speed of sound. The directly computed far-field sound is compared to the prediction of the acoustic analogy proposed by and . The prediction is in excellent agreement with the simulation, where the two-dimensional form of Curle's modified solution is adopted for an accurate calculation of the sound waves with a phase difference between various vortices around the cylinder. It could be confirmed that the scaling law in two dimensions holds in this simulation. In this study, the sound generation due to the dipole and quadrupole fields is investigated by calculating the two terms in Curle's analogy. Examining the surface distribution of dipoles on the cylinder indicates that the force exerted on the fluid by the solid boundaries of the side/upper wall of the rectangular cylinder generates the sound when the co-translating vortices approach /pass the rectangular cylinder, which is the sound due to dipoles corresponding to the directivity of the sound in the polar diagrams. The area distribution of quadrupoles which is the second time derivative of the area integral of Lighthill's stress tensor indicates that the sound is emitted from a vortex generated at the corner of the rectangular cylinder when the vortex pair approaches the cylinder and where the interaction between many vortices around the cylinder and the co-translating vortices generates the sound when the co-translating vortices pass the cylinder.