1630s, Scottish and northern English formation from can (v.1) in its sense of "know how to," + -y (2). "Knowing," hence, "careful." A doublet of cunning that flowed into distinct senses. Often used superciliously of Scots by their southern neighbors (and their American cousins).
Related: Cannily; canniness.