In the pharmaceutical industries, mixing is a critical process. Pharmaceutical products consist of various components, including active ingredient and excipient. After mixing, we should get a homogeneous mixture to ensure the quality of the final products, such as tablets or capsules. For that reason, segregation is an unwanted phenomena in the mixing process. In this study, discrete-element method (DEM) was applied to investigate the mechanism of segregation in a rotating cylinder; basic equipment for powder mixing. In addition, segregation of particles in a rotating cylinder is a very interesting phenomenon and has captured the curiosity of not only industrial engineers, but also physicists. DEM can simulate segregation in a rotating cylinder three-dimensionally. In particular, radial segregation, which was quickly observed, was quantified by computing the granular temperature of the system. Furthermore, particle migration in axial direction, which may be the source of axial segregation, was also shown by the DEM simulation.