Friends and relatives said Hartfield was sleeping on the couch in the living room and confronted the robbers when they kicked in the door.
Hartfield's death shocked teachers, students and staff at U.S. Grant, where he graduated last year.
Hartfield was an All-City and All-State honorable mention basketball selection by The Oklahoman in both 2011 and 2012.
Hartfield attended Connors State College in Warner last fall and played for the school's basketball team, but he left school after the semester partly because of money concerns and partly because of a growing separation between him and his father, family members said.
Hartfield's New Year's resolution was to spend more time with his father, a resolution he was working on the night he was killed.