The two live there with the boy's mother.
Authorities say the baby boy started crying and wouldn't stop, so Melendez punched him.
A short time later, Fernandez had trouble breathing, and Melendez called 911.
The baby was taken to Beth Israel Hospital, where he was pronounced dead.
While being questioned by police, Melendez apparently made statements implicating himself in the child's death.
The mother was not home at the time of the incident and will not be charged.
Sources say Melendez has two prior arrests - one in 1999 for sex abuse and another 2003 for endangering the welfare of a child.
Melendez is charged with second-degree murder, reckless assault of a child and endangering the welfare of a child.