In the early nineties, when he was 22 years old, James Murphy had a chance to try writing for a network-TV sitcom. He passed on the opportunity and spent the rest of the decade working on music instead  playing in a couple of decent bands that never really took off, running sound for a reasonably great band that never really took off, and eventually reaching that still-young age at which the window for having any kind of band take off starts to close. I wonder how often he dwelled on the fact that this Seinfeld show he’d passed on was doing quite well for itself and affording a good number of people much better dinners than the kind normally eaten in late-nineties indie-rock tour vans. It certainly would have nagged at me. But Murphy was hopelessly committed to music  “hopelessly” in the sense that’s less about romantic devotion and more about not really having many other hopes on the burners  so he wound up back in New York, producing and D.J.-ing, and eventually launching a band that turned out to be crucial and successful and as taken-off as taking-off gets, these days: LCD Soundsystem, who are playing their final shows this week, culminating with a big farewell performance at Madison Square Garden on Saturday.

Judging from the first of those shows, last night at Terminal 5, this is genuinely a big farewell: a sweaty, three-hour last stand. Part of the band’s appeal is the same one New Order had — playing dance-music dynamics at rock-music speed — and it feels like this show wants to abridge a long night out dancing into one well-defined chunk. There are three sets: the middle one’s a humid, horn-led sink into dance music; the last one uses a few ragers to leave parts of the audience feeling a little drained, so the band can end on big emotionally transcendent songs and evoke that exhausted, watching-the-sun-rise mood that’s in so much dance music. The second-set special guest actually feels special. (The mass of beard and Afro coming onstage made some people think it was TV on the Radio’s Kyp Malone, but this was something better — a duet with Reggie Watts, a guy as good with music as he is with comedy.) This band is pouring a lot of energy into finishing its run.

Which keeps bringing me back to the part about hopeless commitment. In an old interview with The Wire, when asked to what extent his music was ironic or kidding-around, Murphy underlined exactly how much of his life he’d wound up dedicating to music. He’d never done anything else. He hadn’t gotten through college. He was 34 years old, his parents were gone, and he’d spent his entire life on independent music. Of course he cared; he had no choice. And then, in one of those signature James Murphy moments where he seems to be affably warning his audience about how life turns out, he confessed that this fact might actually be embarrassing and humiliating, and advised that we all pay very close attention to the things we’re gradually committing our lives to without even realizing it.

I call that a signature moment because at some point I began to see the bulk of LCD Soundsystem’s catalogue as revolving around exactly this question: What happens when you really devote yourself to something, over the longest possible term? First it was music. If there’s any one thing the young people seduced by pop music tend to have in common, it’s some desire to become part of the music they love — to slip, at least a little, into the world, lifestyle, and history contained in their record collections and magazines (digital or otherwise). Murphy had already doubled down on that desire, and his brightest idea was to sing about where it led. LCD’s first single, “Losing My Edge,” was a monologue in which the most clued-in person on the scene — the one with immaculate knowledge of the whole canon of vital underground music — watches his position get usurped by younger kids. It’s a blithe parody, a hilarious in-joke that critics lapped up. But it’s also an incredibly serious song about dedicating yourself to something ephemeral; it could just as easily be about aging prizefighters or models or any other form of inevitable obsolescence.

It helped that Murphy’s years of musical experience, and the band’s precision, made LCD Soundsystem a wonder of pure craftsmanship: As time went by, they actually did stitch together a whole canon of vital underground music — 1976 to 1984, which is basically the sixties for a certain class of record geeks — into one impeccably styled dance act. (This is why a lot of their songs sound the same, or sound like older songs; Murphy’s great at manipulating how the songs feel, but he doesn’t disguise the building blocks.) It wasn’t just about music, though, and it wasn’t just funny; there are massive bursts of emotion in the band’s songs, and most of them come from keen and clear-eyed observation of where commitment takes you. Murphy kept writing love letters and notes of complaint to New York City itself, the home he’d chosen. One of the band’s most-beloved songs, “All My Friends,” weighs up all the time you can sink into work or into relationships with people. When you boil down his subject matter, it can actually begin to look like stuff young fans are more likely to hear from parents than favorite musicians: Few people in Murphy’s position have written quite so conversationally about sorting out how to be a functional adult. He just happened to set those questions in a world of music obsessives, party kids, and scene politics.

The variety of those questions made for music that felt strikingly different — that worked differently — than the other acts in LCD’s realm. Over the past decade, indie bands in particular have gotten very good at finding niches: Each one will have a very specific sound and mood, and make entire albums that give you nothing but the one thing they do best. (If you want another mood, there’s another band two mouse clicks away, already specializing in it.) Murphy made records like it was the late seventies and you might only be able to afford one a month: You picked up an LCD Soundsystem LP expecting him to be funny in spots and moving in others, playing frothy New Wave on one track and a deep, dark hustle on another. You expected a sense of time and place to them. (Sometimes the place was New York; sometimes it was just the world of people who cared a little too much about music.) But mostly you heard from someone who seemed to have a vision of what was at stake in the lives of the people getting attached to his music — or, better still, what would be at stake for them seven to ten years down the road, when whatever they’d invested their love into had begun to feel a little different. There’s nothing glorious about the way Murphy wound up committed to music — there are people across this country playing Billy Joel covers in hotel lounges who sunk their lives irrevocably into music — but there’s something glorious in the way he found something rich to say about it.

And after all that immersion in the life and the history of music, Murphy’s surely in touch with a few key things. There’s the optimal lifespan for a band: LCD Soundsystem has been around for just under a decade. There are the optimal shapes of the catalogue left behind: LCD have three LPs, a disc of singles, some remixes, and one record on the side for the faithful to track down. (In music-geek terms, this is a well-balanced amount of material for someone to discover twenty years later.) Now that there’s no longer much money to be made in dragging your band as far as it will go, it feels like most musicians would rather just leave an ideal little history to be admired by some future generation of record collectors. With this group, Murphy’s done a solid job of that. But it’s hard to imagine he won’t stick around the music world doing something — I mean, what else would he do?