As a supplement to Candied Orange's very useful answer, I offer these instances of the term. From Nancy Steinbeck, The Other Side of Eden: Life with John Steinbeck (2001):
When asked about his father's attitude toward the Monterey Peninsula, John [Steinbeck, Junior] said, "He wasn't the town's [Salinas's] favorite son. They didn't like him. His works were not well received. People were outraged that his characters were loosely based on real people. He'd be confused and amused by the homage now being paid to him. There was a long time when he couldn't even get arrested in this town. Even after winning the Nobel and the Pulitzer, many local people refused to acknowledge him as an important writer. Now he's an institution.
From Todd Snider, I Never met a Story I Didn't Like (2014):
One of us said, "We can't even get arrested in this town," which is an old showbiz expression meaning, "I am not popular here."
The expression may be old in show business, but the earliest Google Books matches for the phrase are from 1986. From The Washingtonian, volume 21 (1986):
He couldn't get arrested in this town, as he likes to say. But then, in 1980, he started movie reviews. Arch-at-Large was born. [page 135]
"But to get to be known, you have to have a reason to be out there, and you have to have a place where people can find you—where they know you'll always be. I know that. How well I know that. Ah ha ha ha HA! For the first six years here, I didn't have a role, and I couldn't get arrested in this town. [page 182]
And from Douglas Cohen, No Way to Treat a Lady: Based Upon the Novel by William Goldman (1986):
ALEXANDRA. How dare you compare yourself to me! HOW DARE YOU! I am famous because of my work on the legitimate stage. But you ... you practice murder and pretend it's art.
KIT. It is art! THE TIMES calls me a "master of disguises."
ALEXANDRA. Poor Christopher. Whether you're a successful killer or an unsuccessful actor, you still can't get arrested in this town!
(Her light laughter reverberates in KIT's head as she disappears.)
The point of the expression is to indicate that the person is such a nobody or such a pariah that even something that anybody can do (like getting arrested) is beyond them because it would involve someone else's acknowledging their existence and humanity. An expression sometimes used to similar effect in indicating a person's unpopularity is, "He [or she] couldn't be elected dog catcher"—an implied insult because dog catching is a very low-prestige municipal job.