Mary Sue

A Mary Sue fanfic is in which the primary character is an analog for the author, its abilities inflated to an abnormal level in a way that outshines all other characters. The term had its origins in Star Trek fanfiction.

A Mary Sue story in which the author appears as himself/herself, by name, is called a self-insertion.