It is thought the animal fell into the water at Aberdeen harbour while being loaded on to a ferry.
The coastguard was called to the incident at around 8.30am yesterday after local boats in the harbour failed to herd it back to shore.
A lifeboat was sent out and the crew managed to guide the cow from the water on to a slipway where it was to be collected, but the animal failed to make its way along the path and became distressed as the tide rose. It was then shot by police.
A police spokesman said: "Destruction of the animal was the last resort. Public safety and animal welfare were considered after all other efforts to restrain the animal were unsuccessful."
Speaking before the cow was killed, an Aberdeen coastguard spokesman said: "It's one of the stranger cases we've dealt with."