For beard and moustache problem which kind (department) of doctor should I concern? Doctor from skin or endocrinology department or any other?

Primary doctor first. A person who is losing hair can see his primary care doctor first. After an evaluation, the primary doctor may refer the person to an endocrinologist if there are signs of a hormonal problem (which tends to increase or decrease hair evenly, with the hair and skin not looking diseased); or to a dermatologist if the hair loss is uneven, or if there are signs of infection or inflammation in the skin.
Endocrinologist. If you're a female with abnormal facial hair growth, you will likely require an endocrine work up.
Male or female? For males Dermatologist and for female Endocrinologist.