MicroRNA-mediated post-transcriptional regulation plays key roles in stem cell self-renewal and tumorigenesis. However, the in vivo functions of specific microRNAs in controlling mammary stem cell (MaSC) activity and breast cancer formation remain poorly understood. Here we show that miR-31 is highly expressed in MaSC-enriched mammary basal cell population and in mammary tumors, and is regulated by NF-κB signaling. We demonstrate that miR-31 promotes mammary epithelial proliferation and MaSC expansion at the expense of differentiation in vivo. Loss of miR-31 compromises mammary tumor growth, reduces the number of cancer stem cells, as well as decreases tumor-initiating ability and metastasis to the lung, supporting its pro-oncogenic function. MiR-31 modulates multiple signaling pathways, including Prlr/Stat5, TGFβ and Wnt/β-catenin. Particularly, it activates Wnt/β-catenin signaling by directly targeting Wnt antagonists, including Dkk1. Importantly, Dkk1 overexpression partially rescues miR31-induced mammary defects. Together, these findings identify miR-31 as the key regulator of MaSC activity and breast tumorigenesis.