Is an autobiography a primary source?

Yes, an autobiography is a primary source. Authors of autobiographies are direct witnesses of the events and time described in the narration. Even though autobiographies are usually written after these events happened, they are still categorized as primary sources given the first-hand information, like letters or photographs, they provide.

For example, The Diary of a Young Girl by Anne Frank documents her life in hiding from 1942 to 1944 and is one of the world’s most known autobiographies. This book, although edited, provides direct evidence of Anne Frank's experiences and is, therefore, considered a primary source.

Book cover of diary of a young girl by Anne Frank
The Diary of a Young Girl by Anne Frank is an example of an autobiography as a primary source.

On the other hand, fictional autobiographies are not primary sources in the same sense as legitimate autobiographies. If your research was about fictional biographies and the focus was on their literary interpretation, then they could be primary sources. These would be secondary sources when compared to real autobiographies.