AlwaysOn High Availability Take database offline from primary
Now I have requirement to make one database offline from the primary replica and make it online after some time.


This is not possible since database is added to AOAG. You cannot take the db offline unless you remove it from AG.

What you can do is ...


Disable the login on primary. 
Enable read_only secondary.
Have your application configure to use read intent and read from secondary
After your testing is done, enable the login on primary.