David Krejci ain't just parting ways with the Boston Bruins -- he's ditching his Beantown crib too ... selling the stunning place for $4 million this week.

The hockey player -- who was drafted by the Bruins in 2004 -- announced in July that he was leaving the NHL to continue his playing career in the Czech Republic ... so he had no further need for his swanky Boston home.

So, the guy unloaded it this week -- and he made a killing, 'cause TMZ Sports has learned the price tag made it the highest sale for a single-family home in the Charlestown neighborhood EVER.

The 4,500-square-foot pad has a brownstone vibe ... with 5 bedrooms, 4.5 baths and a beautiful kitchen with a ton of windows.