No — and despite what fans sometimes claim, Sonic the Hedgehog and Shadow the Hedgehog aren't related.
In Sonic Underground, Sonic's siblings Sonia and Manic appear alongside their missing mother, but Shadow is nowhere to be seen. If he were family, that would have been the obvious place to establish it.
Then there's Sonic Heroes, where roughly a hundred Shadow clones are produced by Dr. Eggman — which makes Eggman, in a strange sense, the closest thing Shadow has to a father. And Eggman has no family connection to Sonic whatsoever.
So the conclusion is a simple one: Shadow is not Sonic's cousin.