Brave Dalmatian Tyson took on the highly venomous reptile as it tried to slither into their home in Bhubaneswar, east India.
But both animals ended up dead after the snake bite the dog, injecting it with venom as it fought for its life.
The family woke up to the sound of frenzied barking late at night and rushed to find their pet Tyson fighting with the snake.
Before Ameen Sharif and other family members could intervene, Tyson had managed to overpower the deadly snake.
But the family then watched on in shock as the dog immediately fell ill and appeared in distress.
Mr Sharif checked Tyson for snake bites and found blood on the left side of the dog's face.
He called India's snake helpline and sent a video of the cobra to expert Subhendu Mallik, who identified it as an Indian cobra and advised the family to take the dog to the vets immediately.
But no vets could be contacted due to the late hour and Tyson died just 30 minutes later.
The family is now heartbroken after losing their brave pet, which had succeeded in saving their lives.