For James P. Moran Jr., yesterday's election victory over his former patron, Mayor Charles E. Beatley, completed his return to political power less than a year after he was forced from office.

Moran, who held the title of vice mayor because he got the most votes in the 1982 City Council election, resigned from the council last June after pleading no contest to conflict-of-interest charges.

His comeback at the polls prompted Lou Cook, a local Republican, to remark: "So much for the death of a politician. That Moran could even run just proves that the wheel keeps turning in politics. Yesterday's nightmare is today's hero."

Moran, 39, the oldest of seven children, proudly refers to himself as an "Irish pol" and comes from Natick, Mass., a neighborhood that also produced U.S. House Speaker Thomas P. (Tip) O'Neill. Moran attended Holy Cross College on a football scholarship and graduated in 1967 with a degree in economics.

After a stint as a Wall Street stockbroker, he earned a graduate degree in public administration at the University of Pittsburgh. He came to Washington and worked as an accountant and budget officer at the Department of Health, Education and Welfare, the Library of Congress and the Senate Appropriations Committee.

In 1978 he was named an Outstanding Young Man by the Jaycees, and the next year he was elected to the Alexandria City Council, where he served until his resignation last year. Divorced from Alexandria lawyer Mary Craig, he lives with his two teen-aged children in the Del Ray section of the city.

Moran has aligned himself with the liberal wing of the Democratic Party, stressing the need for better housing for the poor, more day care for city residents and more stability for the city's black neighborhoods.