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