A compound molecular device constructed by carbon nanotube, organic molecule, and metal electrode is proposed, and their electronic transport properties are calculated by using nonequilibrium Green’s functions method in combination with the density-functional theory. The results show that mechanically controlled molecular switch, and electrically induced molecular switch behavior based on negative differential resistance can be observed in such molecular devices. The mechanism for the switch behavior is suggested.