As an obligation to Kira, Mikami went to the bank to get the real notebook and write down Takadas name. It was his loyalty that proved to be his undoing. Gevanni then made copies of Mikamis key card and soon had access to the vault where he was hiding the real Death Note.
What mistake did Mikami?
Due to one of the fake rules in the notebook being: If a person makes this notebook unusable by tearing it up or burning it, all the humans who have touched the Death Note will die. Mikami thought that the SPK would not be able to suspect him of having a page of the notebook.
Why did Mikami mess up?
He made assumptions and killed Takada on his own without waiting for instruction from Light. The SPK had been keeping tabs on Mikamis strict daily routine, and their suspicion was raised when he deviated from that routine by going to the bank to retrieve the real Death Note to kill Takada.
What happened Misa Amane?
Although she fails to kill Ryuzaki (whose name was written on a Death Note prior similar to L), she commits suicide by writing her own name, scribbled Misa Amane dies in Light Yagamis hands.
Did near kill Misa?
The reason was probably that they wanted us to draw our own conclusions from the ending. One of those possible conclusions is that Near cheated and killed both Mikami and Misa using a Death Note, and may have continued using it after that for his understandable reasons of personal gain to win and achieve results.