Mahalaya Paksha is called the Pitru Paksha where the ancestors are remembered and offered the Tharpana.
One of legends for the Pitru Paksha is as follows.
After Karna was slain in the Mahabharata War, he ascended to heavens, Swarga.
There he was offered god and Silver every day but never Food.
He asked Indra, the chief of Devas for the reason.
Indra informed him that though Karna had given away whatever he had to those who had asked him, he never donated Food.
And if Karna were to get food in Swarga, he has to donate Food.
Karna descended to Earth and donated food.
This period is Mahalaya Paksha,one legend goes on.
However I have found no reference to this in the Puranas or Ithihasas.