The contribution of the CP violating three-gluon Weinberg operator, 1 3! w f abc νραβ G a µν G b αβ G cµ ρ , to the atomic and nuclear EDMs is estimated using QCD sum rules. After calculating the transition matrix element between the pion and the vacuum through the Weinberg operator, we obtain the long-range CP-odd nuclear force by determining the isovector CP-odd pion-nucleon vertex, using chiral perturbation theory at NLO. The EDMs of 199 Hg, 129 Xe, 225 Ra, 2 H, and 3 He are finally given including comprehensive uncertainty analysis. While the leading contribution of the 199 Hg EDM is given by the intrinsic nucleon EDM, that of 129 Xe atom may be dominated by the one-pion exchange CP-odd nuclear force generated by the Weinberg operator. From current experimental data of the 199 Hg atomic EDM, we obtain an upper limit on the Weinberg operator magnitude of |w| < 4×10 −10 GeV −2 if we assume that it is the only source of CP violation at the scale µ = 1 TeV.