We derive the super Yang-Mills action of Dp-branes on a torus T^{p-4} from the nonabelian (2,0) theory with Lie 3-algebra. Our realization is based on Lie 3-algebra with pairs of Lorentzian metric generators. The resultant theory then has negative norm modes, but it results in a unitary theory by setting VEV's of these modes. This procedure corresponds to the torus compactification, therefore by taking a transformation which is equivalent to T-duality, the Dp-brane action is obtained. We also study type IIA/IIB NS5-brane and Kaluza-Klein monopole systems by taking other VEV assignments. Such various compactifications can be realized in the nonabelian (2,0) theory, since both longitudinal and transverse directions can be compactified, which is different from the BLG theory. We finally discuss U-duality among these branes, and show that most of the moduli parameters in U-duality group are recovered. Especially in D5-brane case, the whole U-duality relation is properly reproduced.