Sean O’Halloran, aged 18, and a 17-year-old boy, who cannot be named for legal reasons, made no plea as they appeared in private at Aberdeen Sheriff Court.
O’Halloran, from Aberdeen, and the unnamed teen are expected to appear in court again within the next eight days.
They were remanded in custody and committed for further examination.
Mr Hector’s family previously said in a statement: “Scott was a dearly beloved son, a brother, grandson, nephew, cousin and a friend to many. We are all heartbroken by our loss and Scott will be sorely missed by all.
“Scott was an outgoing, happy person who enjoyed life to the full. He had a love for football and enjoyed gaming on his PlayStation.
“We have been totally shocked by the recent events and will never understand why this has happened to Scott. We would ask that our privacy is respected at this difficult time.”
Teenagers in court charged with Aberdeen high rise murder