During embryogenesis, sexually dimorphic organogenesis is achieved by hormones produced in the gonad. The external genitalia develop from a single primordium, the genital tubercle, and their masculinization processes depend on the androgen signaling. In addition to such hormonal signaling, the involvement of nongonadal and locally produced masculinization factors has been unclear. To elucidate the mechanisms of the sexually dimorphic development of the external genitalia, series of conditional mutant mouse analyses were performed using several mutant alleles, particularly focusing on the role of hedgehog signaling pathway in this manuscript. We demonstrate that hedgehog pathway is indispensable for the establishment of male external genitalia characteristics. Sonic hedgehog is expressed in the urethral plate epithelium, and its signal is mediated through glioblastoma 2 (Gli2) in the mesenchyme. The expression level of the sexually dimorphic genes is decreased in the glioblastoma 2 mutant embryos, suggesting that hedgehog signal is likely to facilitate the masculinization processes by affecting the androgen responsiveness. In addition, a conditional mutation of Sonic hedgehog at the sexual differentiation stage leads to abnormal male external genitalia development. The current study identified hedgehog signaling pathway as a key factor not only for initial development but also for sexually dimorphic development of the external genitalia in coordination with androgen signaling.