Objective To analyze the influencing factors and outcomes of atrial septal defect (ASD) and ventricular septal defect (VSD) occlusion guided by echocardiography. Methods We retrospectively analyzed the clinical data of 188 patients receiving transthoracic and percutaneous transcatheter closure of ASD and VSD from July 2009 to July 2017 in our department, including 74 males and 114 females, aged 13.48±13.53 years ranging from 1 to 65 years. Results Fifty-three ASD patients accepted transthoracic closure surgery, of whom 4 patients were difficult to close and 6 patients failed to close; 24 patients underwent percutaneous transcatheter ASD occlusion surgery, of whom 3 were difficult to close and 1 failed in occlusion; 108 VSD patients implemented transthoracic closure surgery, of whom 10 patients were difficult to close and 5 patients failed in closure; 9 VSD patients underwent percutaneous transcatheter closure, of whom 5 failed and then was converted to transthoracic closure. Our study showed that too large or too small aperture was the independent risk factor. Two kinds of closure surgery had their own advantages and disadvantages. The special type of VSD was the influencing factor of transthoracic closure. Conclusion When the ASD diameter≥25 mm, transthoracic closure is the best choice to avoid the use of large occluder. When the ASD diameter<25 mm, percutaneous closure surgery is the best choice. When the ASD diameter≥35 mm, it is best to give up the closure operation. Technical improvements can significantly raise the closure success rate of the subarterial VSD. For the entry diameter>10 mm and membranous aneurysm with multi-break, occlusion surgery should be avoided in VSD.