Tyrosinase, which is encoded by Tyrosinase gene (mel), is the key enzyme in the process of melanin formation in animals, plants and microorganisms. Using the primers designed by comparing the conserved domain of tyrosinase, a DNA fragment was amplified which contain the mel gene from Bacillus thuringiensis 4D11. The recombinant E. coli EMB1179 was gained by subcloning this DNA fragment onto the vector pGEM-7zf and transformed it into E. coli DH5alpha. EMB1179 express the tyrosinase activity and produce melanin under the presence of L-tyrosin. The effect of melanin on survival of E. coli was also determined. The results showed that the melanin produced by EMB1179 effectively increased its resistance against UV light.