Construct a set with different upper and lower Lebesgue density at zero.

I'll deal with the cases $0<\alpha < \beta <1.$ Suppose $b_1 > a_1 > b_2 > a_2 > \cdots \to 0.$ Let $E=\cup_n [a_n,b_n].$ For $0<x<b_1,$ define

$$f(x) = \frac{m(E\cap [0,x])}{x}.$$

Check that $f$ increases on each $[a_n,b_n],$ and decreases on each $[b_{n+1},a_n].$ Thus the maximum of $f$ on $[b_{n+1},b_n]$ is one of the values $f(b_n), f(b_{n+1}),$ while the minimum equals $f(a_n).$ Thus if we can find $a_n,b_n$ such that $f(b_n) = \beta, f(a_n) = \alpha$ for all $n,$ we'll be done.

Note the following:

$$\tag 1 f(b_n)=\frac{(b_n-a_n) + (b_{n+1}-a_{n+1}) + \cdots }{b_n}, \,\, \,\,f(a_n)=\frac{(b_{n+1}-a_{n+1}) + (b_{n+2}-a_{n+2})\cdots }{a_n}.$$

It turns out that we can choose $a_n,b_n$ to be geometric sequences. Define

$$c = \frac{1-\beta}{1-\alpha}, b= c\frac{\alpha}{\beta}.$$

Put $b_n = b^n, a_n = cb^n.$ Then these $b_n,a_n$ do exactly what we want. To check this, use $(1)$ to see

$$f(b_n) = \frac{(1-c)b^n + (1-c)b^{n+1} + \cdots }{b^n} = \frac{1-c}{1-b}.$$

Do some algebra to see the last fraction equals $\beta.$ The same kind of argument gives $f(a_n)=\alpha.$ That completes the proof.

I realize that some of this seems like rabbits out of hats, but it's really not that unintuitive. If you entertain the idea that geometric sequences $a_n,b_n,$ might work, even if the $a_n$ sequence is a fixed constant times the sequence $b_n,$ then the definitions of $b,c$ arise naturally.