Background: Wire-localized excision of non-palpable breast cancer is imprecise, resulting in positive margins 15–35% of the time. Methods: Women with a confirmed diagnosis of non-palpable invasive breast cancer (IBC) or ductal carcinoma in situ (DCIS) were randomized to a new technique using preoperative supine magnetic resonance imaging (MRI) with intraoperative optical scanning and tracking (MRI group) or wire-localized (WL group) partial mastectomy. The main outcome measure was the positive margin rate. Results: In this study, 138 patients were randomly assigned. Sixty-six percent had IBC and DCIS, 22% had IBC, and 12% had DCIS. There were no differences in patient or tumor characteristics between the groups. The proportion of patients with positive margins in the MRI-guided surgery group was half that observed in the WL group (12 vs. 23%; p = 0.08). The specimen volumes in the MRI and WL groups did not differ significantly (74 ± 33.9 mL vs. 69.8 ± 25.1 mL; p = 0.45). The pathologic tumor diameters were underestimated by 2 cm or more in 4% of the cases by MRI and in 9% of the cases by mammography. Positive margins were observed in 68% and 58% of the cases underestimated by 2 cm or more using MRI and mammography, respectively, and in 15% and 14% of the cases not underestimated using MRI and mammography, respectively. Conclusions: A novel system using supine MRI images co-registered with intraoperative optical scanning and tracking enabled tumors to be resected with a trend toward a lower positive margin rate compared with wire-localized partial mastectomy. Margin positivity was more likely when imaging underestimated pathologic tumor size.