Determining the seismic moment tensors (MT) from the observed waveforms, known as full-waveform seismic MT inversion, remains challenging for small to moderate-size earthquakes at regional scales. Firstly, there is an intrinsic difficulty due to a tradeoff between the isotropic (ISO) and compensated linear vector dipole (CLVD) components of MT that impedes resolving shallow explosive sources, e.g., underground nuclear explosions. It is caused by the similarity of long-period waveforms radiated by ISO and CLVD at regional distances. Secondly, regional scales usually bear complex geologic structures; thus, inaccurate knowledge of Earth’s structure should be considered a theoretical error in the MT inversion. However, this has been a challenging problem. So far, only the uncertainty of the 1D Earth model (1D structural error), apart from data errors, has been explored in the source studies. Here, we utilize a hierarchical Bayesian MT inversion to address the above problems. Our approach takes advantage of affine-invariant ensemble samplers to explore the ISO-CLVD tradeoff space thoroughly and effectively. Furthermore, we invert for station-specific time shifts to treat the structural errors along specific source-station paths (2D structural errors). We present synthetic experiments demonstrating the method’s advantage in resolving the ISO components. The application to nuclear explosions conducted by the Democratic People’s Republic of Korea (DPRK) shows highly similar source mechanisms, dominated by a high ISO, significant CLVD components, and a small DC component. The recovered station-specific time shifts from the nuclear explosions present a consistent pattern, which agrees well with the geological setting surrounding the event location.