The characters literally combine to paint a picture: “to separate onto different roads (分道) and raise the bridles (扬镳) to urge the horses onward.” This vivid imagery captures the essence of two parties making a conscious and active decision to move forward on their own separate journeys.
The idiom originates from a story in the historical text *History of the Northern Dynasties* (《北史》). In the story, an official named Yuan Zhi was friends with a man of a lower rank. When Yuan Zhi received a major promotion, he arrogantly told his friend, “I have received this new post. We must now 分道扬镳 (part ways).” He meant that their social statuses were now too different for them to continue associating as equals.
分道扬镳 is a formal term. You won't hear it used casually when saying goodbye for the day. Its use is reserved for significant separations.
The connotation is generally neutral to slightly melancholic. It states a fact of separation rather than placing blame.