Yet another approach is to start by thinking of a string $\sigma\in\{0,1\}^*$ as the binary representation of a non-negative integer. Of course $10,010$, and $0010$ (among others) all represent the same integer, so we have to figure out some way to map them to different integers. One way is to count the leading zeroes and combine that somehow with the binary value. An explicit bijection from ordered pairs of natural numbers to natural numbers would be useful here, and there is a well-known one that’s not too hard to describe, the so-called pairing function. Finally, we want to map $\{0,1\}^*$ onto $\Bbb Z$, not $\Bbb N$, so we need to generate an algebraic sign from each $\sigma$; we can use the first character to do that.
If $\epsilon\ne\sigma\in\{0,1\}^*$, let $\sigma_0$ be the first character of $\sigma$, and let $\widehat\sigma$ be the rest of $\sigma$ after $\sigma_0$ is deleted. This reduced string $\widehat\sigma$ can be interpreted as the binary representation of a unique integer $n(\sigma)$. Let $z(\sigma)$ be the number of leading zeroes in $\widehat\sigma$. For example,
$$n(0)=n(1)=z(0)=z(1)=0\;,$$
and
$$n(0010)=n(1010)=2\quad\text{ and }\quad z(0010)=z(1010)=1\;.$$
Let $\varphi:\Bbb N\times\Bbb N\to\Bbb N$ be the pairing function, and let
$$f:\{0,1\}^*\to\Bbb Z:\sigma\mapsto\begin{cases}
0,&\text{if }\sigma=\epsilon\\
\varphi(\langle z(\sigma),n(\sigma)\rangle)+1,&\text{if }\sigma\ne\epsilon\text{ and }\sigma_0=0\\
-\big(\varphi(\langle z(\sigma),n(\sigma)\rangle)+1\big),&\text{if }\sigma\ne\epsilon\text{ and }\sigma_0=1\;;
\end{cases}$$
I’ll leave you to check, if you wish, that this $f$ works.
Added: In order to prove that your map is a bijection, you’ll have to define it more clearly. Here is one way to do that. For $n\in\Bbb N$ let $\Sigma_n=\{\sigma\in\{0,1\}^*:|\sigma|=n\}$, where $|\sigma|$ is the length of $\sigma$; $|\Sigma_n|=2^n$. For $n>0$ and $i\in\{0,1\}$ let $\Sigma_n^i$ be the set of strings in $\Sigma_n$ that begin with $i$; $|\Sigma_n^0|=|\Sigma_n^1|=2^{n-1}$. Following your basic idea, we’ll send $\epsilon$, the unique member of $\Sigma_0$, to $0$, and for each $n>0$ we’ll send the members of $\Sigma_n^0$ to the first available $2^{n-1}$ positive integers and the members of $\Sigma_n^1$ to their negative counterparts. That is, we’ll send the string $0\in\Sigma_1^0$ to the integer $1$, the string $1\in\Sigma_1^1$ to the integer $-1$, the strings in $\Sigma_2^0=\{00,01\}$ to the integers $2$ and $3$ and the strings in $\Sigma_2^1=\{10,11\}$ to the integers $-2$ and $-3$, the strings in $$\Sigma_3^0=\{000,001,010,011\}$$ to the integers $4,5,6$, and $7$ and the strings in $$\Sigma_3^1=\{100,101,110,111\}$$ to the integers $-4,-5,-6$, and $-7$, and so on. But in order to define $f$, we still have to specify how to assign a specific integer to each string in $\Sigma_n^i$.
Notice that we’re sending the strings in $\Sigma_n^0$ to the integers $2^{n-1},2^{n-1}+1,\ldots,2^n-1$ and the strings in $\Sigma_n^1$ to the negatives of these integers. Each string in $\Sigma_n^0$ can be interpreted as a binary number in the set $\{0,1,\dots,2^{n-1}-1\}$. If we let $b(\sigma)$ denote the binary interpretation of a string $\sigma\in\Sigma_n^0$, the map that I sketched in the previous paragraph can be described by saying that $f(\sigma)=2^{n-1}+b(\sigma)$. If $\sigma\in\Sigma_n^1$, we can interpret all of $\sigma$ after the leading $1$ as a binary number, and it will also be in the set $\{0,1,\ldots,2^{n-1}-1\}$; call this number $b(\sigma)$. The map sketched in the previous paragraph sends $\sigma\in\Sigma_n^1$ to $f(\sigma)=-\left(2^{n-1}+b(\sigma)\right)$.
In other words, you can make your idea precise by defining
$$f:\{0,1\}^*\to\Bbb Z:\sigma\mapsto\begin{cases}
0,&\text{if }\sigma=\epsilon\\
(-1)^i\left(2^{n-1}+b(\sigma)\right),&\text{if }\sigma\in\Sigma_n^i\text{ and }n>0\;.
\end{cases}\tag{1}$$
Now your function $f$ is explicitly defined, and you can work on showing that it is both one-to-one and onto. To show that $f$ is onto, let $k$ be any integer, and explain how to construct a string $\sigma\in\{0,1\}^*$ such that $f(\sigma)=k$. If you do this carefully, you’ll actually show that there is exactly one such $\sigma$, which will show that $f$ is also one-to-one.