some borderline problems exist here. yes you may have achieved well academically because you may be a bright girl but it is probably the same intelligence that is alerting you to something not being or feeling right. You must have been exposed to some inproper conduct to be mastubating at such an early age and even knowing or experiencing the feeling of orgasm. No young person at heart will masturbate to the feeling of orgasm.
However not suggesting actual sexual intercourse or contact by somebody but probably some misconduct or inappropiate causes such as pornography, witnessing parents.
Can you remember vaguely why these things made you feel naughty? Because being so young it should be innocent and the feeling of being naughty or good shouldnt really exist.
There has been shown to be a connection between excessive masturbation and abuse in small children, ,it may not be in your case, it could be you have heard ,even here, and read so much about abuse that it seems that you may have been ,not all children who become anxious have been abused I would say some counseling may help you .