With their rapid development and huge potential, brain-machine interfaces (BMIs) will become one of the most important technologies in human society within decades. However, the ethical framework around this technology is far from mature. This paper seeks to summarize, analyze, and provide solutions to ethical issues associated with a particularly transformative family of BMIs - cognitive BMIs. 18 articles were included in this review through a structured article selection process. The discussion of the ethics of cognitive BMIs is divided into six topics: (i) individual cost-benefit balance; (ii) privacy and cybersecurity; (iii) autonomy, authenticity, and responsibility; (iv) equality; (v) cultural issues; (vi) military dual use. Within each topic, ethical issues that appeared in the reviewed articles are discussed, and solutions or directions for approaching them are given.