I tried to terminate my instance and it is hung in the shutting-down state
did you try to terminate it from the AWS console?
If yes, did you refresh the browser?
Sometimes, this could be caused by AWS infrastructure issue. A similar issue reported to AWS and here is the answer:
This is caused by AWS infrastructure issue. This instance has already been terminated from hardware side. However there are some issues when different systems synchronize instance status information. Thus instance shows shutting down state from your side.
And, you will not be charged if instance is in pending shutdown state.
Open an AWS support case for this kind of problem, and AWS support will shutdown the instance from their side.
Below is documentation from Amazon.