"Weird" is the adjective; "weirdly," the adverb. So "behaving weirdly" is the correct choice. You may find the other in informal communication, especially conversation.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.