Transgenesis in Drosophila melanogaster relies upon direct microinjection of embryos and subsequent crossing of surviving adults. The necessity of crossing single flies to screen for transgenic events limits the range of useful transgenesis techniques to those that have a very high frequency of integration, so that about 1 in 10 to 1 in 100 surviving adult flies carry a transgene. Until recently, only random P-element transgenesis fulfilled these criteria. However, recent advances have brought homologous recombination and site-directed integration up to and beyond this level of efficiency. For all transgenesis techniques in Drosophila melanogaster, microinjection of embryos is the central procedure. This chapter gives a detailed protocol for microinjection, and aims to enable the reader to use it for both site-directed integration and for P-element transgenesis.