Which atom goes in the middle of a lewis dot structure?
ETA: I'm unclear about your question.  Are you asking why nitrogen isn't the central atom or why sodium isn't?  If it's the former, the explanation is below.  If it is the latter, sodium, then it's because this is an ionic compound, and we build the lewis structures of the cation and anion separately.

First and foremost, carbon (EN=2.5) is less electronegative than nitrogen (EN=3.1), so by your rule it should be in the center.

A more complete explanation of why that is:

Your molecule is sodium cyanide, an ionic compound.  The cyanide group, CN-, carries a negative charge.  If we consider where that charge lies in the ion, it is a bit confusing.  The basic structure of the cyanide is  ${\ce :C:::N:^-}$  .  

At first glance we might think that the nitrogen would be the more negative end of the ion, since it is the more electronegative atom.  However, if we consider the formal charges of the atoms in the ion, we see that nitrogen has a formal charge of 0 and carbon a formal charge of -1.  Formal charge is not the same as actual charge, but it does tell us that the carbon will be the negative end of the ion, and that is what we see in its bonding.  

Here, the sodium ion, Na+, bonds with the carbon in the cyanide ion.  Even if it weren't a sodium ion, but something like hydrogen cyanide (with covalent bonding) the bond would be formed at the carbon end.  This is because that structure would allow carbon to minimize its electron excess and reach a lower energy state than if the hydrogen stuck to the nitrogen.  Again, formal charges predict the HCN structure over the HNC structure.