I have a client and I have a function to his company as HR admin. He had given me access to his Upwork account to post the job vacancy and hire a freelancer by sending the job offer, Is there a violation if we will hire a relative or a member of my family for a particular position?
It is not Upwork's intention that you hire a relative or member of your family.
Upwork has algorithms that check for this sort of thing. You and your relative or family member could have your accounts suspended or terminated for doing this.
If you want to hire those family members, then simply hire them directly. Do not use Upwork to hire family members.
Also, it is a serious violation of Upwork ToS for you to log in with another user's username and password. You are not allowed to know another user's password. You are nog allowed to have access to a client's Upwork account.
There is an established and proper way for you to post jobs and hire freelancers on behalf of a client:
Thanks for the message. Please note that you may not hire friends or family members due to a conflict of interest. However, if you would like a friend or family member to assist you with a freelance project for a client, you might consider setting up an agency. You can also discuss the best course of action with your client.