My account type is Enterprise Edition, i want to create new apex class, but when i try to create new apex from developer console, it shows the error "Cannot create apex class in active organization". I can login to 'developer.salesforce.com', but when i go to "My Developer Account", and try to create new apex class, still showing error.
You can't create or edit Apex or Visualforce in production organizations. You need to create your work in a sandbox and migrate it with a change set, or use an IDE like Eclipse, Illuminated Cloud, etc., to perform a deployment. Keep in mind that when deploying Apex, you will be required to include unit tests for your code to achieve the standard 75% code coverage metrics.
While you can write code in a Developer Edition, you will need an IDE or some other deployment tool to move it to Production, as Developer Editions cannot establish a change set deployment connection. Note that you login to a Developer Edition of Salesforce with your Developer Edition credentials at login.salesforce.com. That's not the same as a Developer Forum or Trailblazer Community account.
If you're not familiar with sandboxes or change sets, I would recommend completing the Change Management module on Trailhead.