I am a lawyer and a beekeeper in North Carolina. If you do have an attorney who is a member of your beekeeping organization you may want to see if he/she has already researched the issue and might give you a free or reduced cost consultation. I live in Greensboro, NC and our City Council passed a revised beekeeping ordinance that relaxed setback requirements in the city. I became involved, not as attorney for the beekeeper who was cited, but as a "representative" of the Guilford Beekeepers (meaning I worked for free). Once the beekeeper had been cited and said he was going to pursue the issue, I became involved. Since any change in the city ordinance would affect me and several friends and club members, I wanted to try and see that any changes to the ordinance did not make things worse.
Because our ordinance was in our zoning codes, the beekeeper filed and appeared before the Board of Adjustment asking to be allowed to keep his bees. The Board could not grant his request because his lot couldnot meet the ordinance requirements under any circumstances. He and I met with city planners and 2 versions of a revised ordinance were presented to Planning Board. The Planning Board voted not to recommend either (largely because of issues involving poultry in the same ordinance). The Planning Department forwarded one version to City Council for a public meeting and vote, and Council accepted some changes I asked for and passed a less restrictive ordinance.
Your process may be very different so you should find out what you are dealing with first. Is there a bee keeping ordinance or just a general nuisance ordinance? What is the enforcement mechanism? What appeal processes do you have?
We found the city planners and the city to be generally helpful and receptive to our concerns. I always kept conversations friendly and always assumed that the people I was dealing with were acting in good faith. They were. City Council was bee friendly and somewhat to my surprise, quite chicken friendly. Don't make enemies if you don't have to. Do your homework regarding bees and bee behavior. Have legitimate literature or websites that you can hand out/send officials to so that you can educate your city officials. if need be, and not have them act out of ignorance or fear.
Before you get too far along, you also need to consider whether your home is in a development that has its own private rules that you must follow. In North Carolina, private restritive covenants that are properly drawn and recorded are generally enforceable, and can be far more limiting than the city oridnances. I obviously cannot advise you about the law or private contracts in your State, but I did want to share our experience and some general ideas about how to deal the situation.
Sorry for the long post, and I hope this helps you get started on a happy resolution to your problem.