CHARLOTTE, N.C. — For 14 years, they seemed made for each other: affable, glad-handing “Mayor Pat,” and this city, North Carolina’s largest and a place long defined more by entrepreneurial hustle and economic success than ideology and hard-edge politics.

These days, it is not entirely clear whether Pat McCrory, the Republican who was mayor from 1995 to 2009, or Charlotte, which Mr. McCrory is now feuding with as North Carolina’s governor, has changed more. But it is apparent that the antidiscrimination ordinance that Charlotte sought to change this year and the successful effort by Mr. McCrory and state lawmakers to block the modification have left both the city and its former mayor reeling and distant.

“With social issues, you never satisfy the litmus test of either the right or the left,” Mr. McCrory said over a Styrofoam cup of lemonade on Thursday. “And the social issues are much more complex than the media and the political pundits will give credit for, including the one we’re dealing with today.”

The state has faced a backlash since the Republican-controlled General Assembly, during a one-day special session in March, passed a measure to limit public restroom access for transgender people and prohibit local governments from passing antidiscrimination ordinances. And Charlotte, a city of about 810,000 people that promoted itself in the 1970s as “a good place to make money,” has taken a particularly hard hit since the law known as House Bill 2 took effect.