Mîm lived with his two sons at Amon Rûdh in middle Beleriand, where he kept a secret treasury. During Túrin's time with the Outlaws, Mîm and sons were seen as they snuck past the outlaws carrying heavy sacks. Mîm was captured, and arrows were shot at his sons Ibun and Khîm.
In exhange for his life, Mîm was forced to lead the outlaws to his secret halls in Amon Rûdh. There, it turned out Khîm had been killed by an arrow, and Túrin repenting offered his service to Mîm. For this reason Mîm tolerated the outlaws, and eventually even took a liking to Túrin.
When Beleg Cúthalion arrived at Amon Rûdh, Mîm was angry: he hated Elves, especially the Sindar. Nevertheless he had to tolerate the Elf in his halls. After Amon Rûdh was betrayed to Morgoth, Mîm somehow escaped, but it seems Ibûn was killed by Orcs. Eventually Mîm made his way to Nargothrond after Túrin had killed Glaurung, and he took the treasure for his own.
Húrin Thallion, who had seen all that had happened to Túrin with Morgoth's eyes, came across Mîm in Nargothrond, and killed him, deeming him partially responsible for Túrin's fate. With his dying words Mîm cursed the treasure. Húrin's band brought the treasure of Nargothrond to Doriath, where eventually the gold was a reason for the Sack of Doriath and the death of Thingol.
Other versions of the legendarium
In earlier versions of the Silmarillion as detailed in The History of Middle-earth series, Mîm was a much more evil character, who actively betrayed Túrin. But as Dwarves gradually changed in Tolkien's writings from evil Orc-like beings to the Dwarves they later became, Mîm's character was changed, and in the final texts he is no longer a true villain, but almost a tragic character in his own right.