Can iMessages be deleted permanently or at least kept either on a phone or a computer, but not both?
It sounds like you simply have iMessage enabled on your Mac (which doesn't have anything to do with plugging your phone in, since your messages are synced through iCloud).

Anyway, just open up Messages (iChat), go to Preferences > Accounts, select your iMessage account in the list on the left and then unchecked the "enable this account" checkbox.