Marshall Eriksen is a fictional character on the CBS sitcom How I Met Your Mother, portrayed by Jason Segel. Series co-creator Craig Thomas explained that he based Marshall and Lily on himself and his wife Rebecca.